{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "SemConvSpecV2", "description": "A semconv file is a collection of attributes, signals, groups,\nand imports.", "type": "object", "properties": { "attribute_groups": { "description": "A collection of semantic conventions for AttributeGroups.", "type": "array", "items": { "$ref": "#/$defs/AttributeGroup" } }, "attributes": { "description": "A collection of semantic conventions for attributes.", "type": "array", "items": { "$ref": "#/$defs/AttributeDef" } }, "entities": { "description": "A collection of semantic conventions for Entity signals.", "type": "array", "items": { "$ref": "#/$defs/Entity" } }, "entity_refinements": { "description": "A collection of semantic convention refinements for Entity signals.", "type": "array", "items": { "$ref": "#/$defs/EntityRefinement" } }, "event_refinements": { "description": "A collection of semantic convention refinements for Event signals.", "type": "array", "items": { "$ref": "#/$defs/EventRefinement" } }, "events": { "description": "A collection of semantic conventions for Event signals.", "type": "array", "items": { "$ref": "#/$defs/Event" } }, "file_format": { "description": "The file format version.", "type": "string", "const": "definition/2" }, "imports": { "description": "A list of imports referencing groups defined in a dependent registry.", "anyOf": [ { "$ref": "#/$defs/Imports" }, { "type": "null" } ] }, "metric_refinements": { "description": "A collection of semantic convention refinements for Metric signals.", "type": "array", "items": { "$ref": "#/$defs/MetricRefinement" } }, "metrics": { "description": "A collection of semantic conventions for Metric signals.", "type": "array", "items": { "$ref": "#/$defs/Metric" } }, "span_refinements": { "description": "A collection of semantic convention refinements for Span signals.", "type": "array", "items": { "$ref": "#/$defs/SpanRefinement" } }, "spans": { "description": "A collection of semantic conventions for Span signals.", "type": "array", "items": { "$ref": "#/$defs/Span" } } }, "additionalProperties": false, "$defs": { "AttributeDef": { "description": "The definition of an Attribute.", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "examples": { "description": "Sequence of example values for the attribute or single example\nvalue. They are required only for string and string array\nattributes. Example values must be of the same type of the\nattribute. If only a single example is provided, it can directly\nbe reported without encapsulating it into a sequence/dictionary.", "anyOf": [ { "$ref": "#/$defs/Examples" }, { "type": "null" } ] }, "key": { "description": "String that uniquely identifies the attribute.", "type": "string" }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" }, "type": { "description": "Either a string literal denoting the type as a primitive or an\narray type, a template type or an enum definition.", "$ref": "#/$defs/AttributeType" } }, "additionalProperties": false, "required": [ "key", "type", "brief", "stability" ] }, "AttributeGroup": { "description": "Attribute group definition.", "oneOf": [ { "description": "An internal attribute group", "type": "object", "properties": { "attributes": { "description": "List of attributes and group references that belong to this group", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "id": { "description": "The name of the attribute group, must be unique.", "$ref": "#/$defs/SignalId" }, "visibility": { "type": "string", "const": "internal" } }, "additionalProperties": false, "required": [ "visibility", "id" ] }, { "description": "A public attribute group", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes and group references that belong to this group", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "id": { "description": "The name of the attribute group, must be unique.", "$ref": "#/$defs/SignalId" }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" }, "visibility": { "type": "string", "const": "public" } }, "additionalProperties": false, "required": [ "visibility", "id", "brief", "stability" ] } ] }, "AttributeOrGroupRef": { "description": "A reference to either an attribute or an attribute group.", "anyOf": [ { "description": "Reference to an attribute.", "$ref": "#/$defs/AttributeRef" }, { "description": "Reference to an attribute group.", "$ref": "#/$defs/GroupRef" } ] }, "AttributeRef": { "description": "A refinement of an Attribute for a signal.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the attribute. These will be\nmerged with annotations from the definition.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "Refines the brief description of the attribute.", "type": [ "string", "null" ] }, "examples": { "description": "Refined sequence of example values for the attribute or single example\nvalue. They are required only for string and string array\nattributes. Example values must be of the same type of the\nattribute. If only a single example is provided, it can directly\nbe reported without encapsulating it into a sequence/dictionary.", "anyOf": [ { "$ref": "#/$defs/Examples" }, { "type": "null" } ] }, "note": { "description": "Refines the more elaborate description of the attribute.", "type": [ "string", "null" ] }, "ref": { "description": "Reference an existing attribute by key.", "type": "string" }, "requirement_level": { "description": "Refines the attribute requirement level. Can be \"required\",\n\"conditionally_required\", \"recommended\" or \"opt_in\". When omitted,\nthe original attribute requirement level is used. When set to\n\"conditionally_required\", the string provided as `condition` MUST\nspecify the conditions under which the attribute is required.", "anyOf": [ { "$ref": "#/$defs/RequirementLevel" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "ref" ] }, "AttributeType": { "description": "The different types of attributes (specification).", "anyOf": [ { "description": "Primitive or array type.", "$ref": "#/$defs/PrimitiveOrArrayTypeSpec" }, { "description": "A template type.", "$ref": "#/$defs/TemplateTypeSpec" }, { "description": "An enum definition type.", "type": "object", "properties": { "members": { "description": "List of enum entries.", "type": "array", "items": { "$ref": "#/$defs/EnumEntriesSpec" } } }, "required": [ "members" ] } ] }, "BasicRequirementLevelSpec": { "description": "The different types of basic requirement levels.", "oneOf": [ { "description": "A required requirement level.", "type": "string", "const": "required" }, { "description": "An optional requirement level.", "type": "string", "const": "recommended" }, { "description": "An opt-in requirement level.", "type": "string", "const": "opt_in" } ] }, "Deprecated": { "description": "The different ways to deprecate an attribute, a metric, ...", "oneOf": [ { "description": "The telemetry object containing the deprecated field has been renamed to an\nexisting or a new telemetry object.", "type": "object", "properties": { "note": { "description": "The note to provide more context about the deprecation.\nWhen not provided, it is inferred from `renamed_to`.", "type": [ "string", "null" ] }, "reason": { "type": "string", "const": "renamed" }, "renamed_to": { "description": "The new name of the telemetry object.", "type": "string" } }, "required": [ "reason", "renamed_to" ] }, { "description": "The telemetry object containing the deprecated field has been obsoleted\nbecause it no longer exists and has no valid replacement.\n\nThe `brief` field should contain the reason why the field has been obsoleted.", "type": "object", "properties": { "note": { "description": "The note to provide more context about the deprecation.", "type": "string" }, "reason": { "type": "string", "const": "obsoleted" } }, "required": [ "reason", "note" ] }, { "description": "The telemetry object containing the deprecated field has been deprecated for\ncomplex reasons (split, merge, ...) which are currently not precisely defined\nin the supported deprecation reasons.\n\nThe `brief` field should contain the reason for this uncategorized deprecation.", "type": "object", "properties": { "note": { "description": "The note to provide more context about the deprecation.", "type": "string" }, "reason": { "type": "string", "const": "uncategorized" } }, "required": [ "reason", "note" ] }, { "description": "This variant is used to capture old, unstructured deprecated \"string\".\nUsed for backward-compatibility only.", "type": "object", "properties": { "note": { "description": "The note to provide more context about the deprecation.", "type": "string" }, "reason": { "type": "string", "const": "unspecified" } }, "required": [ "reason", "note" ] } ] }, "Entity": { "description": "Defines a new entity.", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "description": { "description": "The attributes that make the description of the Entity.", "type": "array", "items": { "$ref": "#/$defs/AttributeRef" } }, "identity": { "description": "The attributes that make the identity of the Entity.", "type": "array", "items": { "$ref": "#/$defs/AttributeRef" } }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "requirement_level": { "description": "The requirement level of the entity. Defaults to 'recommended' when omitted.", "anyOf": [ { "$ref": "#/$defs/SignalRequirementLevel" }, { "type": "null" } ] }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" }, "type": { "description": "The type of the Entity.", "$ref": "#/$defs/SignalId" } }, "additionalProperties": false, "required": [ "type", "identity", "brief", "stability" ] }, "EntityAssociation": { "description": "An entity association expression.\n\nIn YAML this is either a bare string (an entity reference), a `{ one_of: [...] }` map or a\n`{ all_of: [...] }` map, where each list element is itself an [`EntityAssociation`].", "anyOf": [ { "description": "A reference to an entity by its type name.", "type": "string" }, { "description": "Satisfied when at least one of the contained expressions is satisfied.", "type": "object", "properties": { "one_of": { "description": "The candidate expressions.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } } }, "required": [ "one_of" ] }, { "description": "Satisfied when every contained expression is satisfied.", "type": "object", "properties": { "all_of": { "description": "The required expressions.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } } }, "required": [ "all_of" ] } ] }, "EntityRefinement": { "description": "A refinement of an existing entity.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "Refines the brief description of the signal.", "type": [ "string", "null" ] }, "deprecated": { "description": "Specifies if the signal is deprecated.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "description": { "description": "Refinements or additional attributes to describe the Entity.\n\nAttributes listed here have the descriptive role.", "type": "array", "items": { "$ref": "#/$defs/AttributeRef" } }, "id": { "description": "The ID of the refinement.", "$ref": "#/$defs/SignalId" }, "identity": { "description": "Refinements of the base entity's identity attributes.\n\nA refinement must not change *which* attributes identify the entity: it\nmay only refine attributes the base entity already lists under\n`identity`.", "type": "array", "items": { "$ref": "#/$defs/AttributeRef" } }, "note": { "description": "Refines the more elaborate description of the signal.", "type": [ "string", "null" ] }, "ref": { "description": "The name of the entity being refined.", "$ref": "#/$defs/SignalId" }, "stability": { "description": "Refines the stability of the signal.", "anyOf": [ { "$ref": "#/$defs/Stability" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "id", "ref" ] }, "EnumEntriesSpec": { "description": "Possible enum entries.", "type": "object", "properties": { "annotations": { "description": "Annotations for the member.", "type": [ "object", "null" ], "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "Brief description of the enum entry value.\nIt defaults to the value of id.", "type": [ "string", "null" ] }, "deprecated": { "description": "Deprecation note.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "id": { "description": "String that uniquely identifies the enum entry.", "type": "string" }, "note": { "description": "Longer description.\nIt defaults to an empty string.", "type": [ "string", "null" ] }, "stability": { "description": "Stability of this enum value.", "anyOf": [ { "$ref": "#/$defs/Stability" }, { "type": "null" } ] }, "value": { "description": "String, int, or boolean; value of the enum entry.\nIf omitted, defaults to the value of `id`.", "anyOf": [ { "$ref": "#/$defs/ValueSpec" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "id" ] }, "Event": { "description": "Defines a new event.", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this event should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "name": { "description": "The name of the event.", "$ref": "#/$defs/SignalId" }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "requirement_level": { "description": "The requirement level of the event. Defaults to 'recommended' when omitted.", "anyOf": [ { "$ref": "#/$defs/SignalRequirementLevel" }, { "type": "null" } ] }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" } }, "additionalProperties": false, "required": [ "name", "brief", "stability" ] }, "EventRefinement": { "description": "A refinement of an existing event.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "brief": { "description": "Refines the brief description of the signal.", "type": [ "string", "null" ] }, "deprecated": { "description": "Specifies if the signal is deprecated.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this event should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "id": { "description": "The ID of the refinement.", "$ref": "#/$defs/SignalId" }, "note": { "description": "Refines the more elaborate description of the signal.", "type": [ "string", "null" ] }, "ref": { "description": "The name of the event being refined.", "$ref": "#/$defs/SignalId" }, "stability": { "description": "Refines the stability of the signal.", "anyOf": [ { "$ref": "#/$defs/Stability" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "id", "ref" ] }, "Examples": { "description": "The different types of examples.", "anyOf": [ { "description": "A boolean example.", "type": "boolean" }, { "description": "A integer example.", "type": "integer", "format": "int64" }, { "description": "A double example.", "type": "number", "format": "double" }, { "description": "A string example.", "type": "string" }, { "description": "A any example.", "$ref": "#/$defs/ValueSpec" }, { "description": "A array of integers example.", "type": "array", "items": { "type": "integer", "format": "int64" } }, { "description": "A array of doubles example.", "type": "array", "items": { "type": "number", "format": "double" } }, { "description": "A array of bools example.", "type": "array", "items": { "type": "boolean" } }, { "description": "A array of strings example.", "type": "array", "items": { "type": "string" } }, { "description": "A array of anys example.", "type": "array", "items": { "$ref": "#/$defs/ValueSpec" } }, { "description": "List of arrays of integers example.", "type": "array", "items": { "type": "array", "items": { "type": "integer", "format": "int64" } } }, { "description": "List of arrays of doubles example.", "type": "array", "items": { "type": "array", "items": { "type": "number", "format": "double" } } }, { "description": "List of arrays of bools example.", "type": "array", "items": { "type": "array", "items": { "type": "boolean" } } }, { "description": "List of arrays of strings example.", "type": "array", "items": { "type": "array", "items": { "type": "string" } } } ] }, "GroupRef": { "description": "A reference to an attribute group.", "type": "object", "properties": { "ref_group": { "description": "Reference an existing attribute group by id.", "$ref": "#/$defs/SignalId" } }, "additionalProperties": false, "required": [ "ref_group" ] }, "GroupWildcard": { "description": "Represents a wildcard expression to import one or several groups defined in an imported\nregistry.", "type": "string" }, "Imports": { "description": "Imports are used to reference groups defined in a dependent registry.", "type": "object", "properties": { "attribute_groups": { "description": "A list of attribute_group group id wildcards.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/GroupWildcard" } }, "entities": { "description": "A list of entity group name wildcards.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/GroupWildcard" } }, "events": { "description": "A list of event group name wildcards.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/GroupWildcard" } }, "metrics": { "description": "A list of metric group metric_name wildcards.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/GroupWildcard" } }, "spans": { "description": "A list of span group name wildcards.", "type": [ "array", "null" ], "items": { "$ref": "#/$defs/GroupWildcard" } } }, "additionalProperties": false }, "InstrumentSpec": { "description": "The type of the metric.", "oneOf": [ { "description": "An up-down counter metric.", "type": "string", "const": "updowncounter" }, { "description": "A counter metric.", "type": "string", "const": "counter" }, { "description": "A gauge metric.", "type": "string", "const": "gauge" }, { "description": "A histogram metric.", "type": "string", "const": "histogram" } ] }, "Metric": { "description": "Defines a new metric.", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this metric should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "instrument": { "description": "The instrument type that should be used to record the metric. Note that\nthe semantic conventions must be written using the names of the\nsynchronous instrument types (counter, gauge, updowncounter and\nhistogram).\nFor more details: [Metrics semantic conventions - Instrument types](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/metrics/semantic_conventions#instrument-types).\nNote: This field is required if type is metric.", "$ref": "#/$defs/InstrumentSpec" }, "name": { "description": "The name of the metric.", "$ref": "#/$defs/SignalId" }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "requirement_level": { "description": "The requirement level of the metric. Defaults to 'recommended' when omitted.", "anyOf": [ { "$ref": "#/$defs/SignalRequirementLevel" }, { "type": "null" } ] }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" }, "unit": { "description": "The unit in which the metric is measured, which should adhere to the\n[guidelines](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/metrics/semantic_conventions#instrument-units).", "type": "string" } }, "additionalProperties": false, "required": [ "name", "instrument", "unit", "brief", "stability" ] }, "MetricRefinement": { "description": "A refinement of an existing metric.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/AttributeOrGroupRef" } }, "brief": { "description": "Refines the brief description of the signal.", "type": [ "string", "null" ] }, "deprecated": { "description": "Specifies if the signal is deprecated.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this metric should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "id": { "description": "The ID of the refinement.", "$ref": "#/$defs/SignalId" }, "note": { "description": "Refines the more elaborate description of the signal.", "type": [ "string", "null" ] }, "ref": { "description": "The name of the metric being refined.", "$ref": "#/$defs/SignalId" }, "stability": { "description": "Refines the stability of the signal.", "anyOf": [ { "$ref": "#/$defs/Stability" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "id", "ref" ] }, "PrimitiveOrArrayTypeSpec": { "description": "Primitive or array types.", "oneOf": [ { "description": "A boolean attribute.", "type": "string", "const": "boolean" }, { "description": "A integer attribute (signed 64 bit integer).", "type": "string", "const": "int" }, { "description": "A double attribute (double precision floating point (IEEE 754-1985)).", "type": "string", "const": "double" }, { "description": "A string attribute.", "type": "string", "const": "string" }, { "description": "An any type attribute (accepts any valid value).", "type": "string", "const": "any" }, { "description": "An array of strings attribute.", "type": "string", "const": "string[]" }, { "description": "An array of integer attribute.", "type": "string", "const": "int[]" }, { "description": "An array of double attribute.", "type": "string", "const": "double[]" }, { "description": "An array of boolean attribute.", "type": "string", "const": "boolean[]" } ] }, "RequirementLevel": { "description": "The different requirement level specifications.", "anyOf": [ { "description": "A basic requirement level.", "$ref": "#/$defs/BasicRequirementLevelSpec" }, { "description": "A conditional requirement level.", "type": "object", "properties": { "conditionally_required": { "description": "The description of the condition.", "type": "string" } }, "required": [ "conditionally_required" ] }, { "description": "A recommended requirement level.", "type": "object", "properties": { "recommended": { "description": "The description of the recommendation.", "type": "string" } }, "required": [ "recommended" ] }, { "description": "An opt in requirement level.", "type": "object", "properties": { "opt_in": { "description": "The description of the recommendation.", "type": "string" } }, "required": [ "opt_in" ] } ] }, "SignalId": { "description": "An identifier for a signal. Should be `.` separated namespaces and names.", "type": "string" }, "SignalRequirementLevel": { "description": "The requirement level of a signal (metric, span, event, entity). It is\nguidance for instrumentation authors about what should be emitted by default\nversus what should be opt-in. Unlike attribute requirement levels, signals\nonly support these two levels.", "oneOf": [ { "description": "Instrumentations should implement and emit the signal by default.\nThis is the default for signals that do not specify a requirement level.", "type": "string", "const": "recommended" }, { "description": "Disabled by default; instrumentations MAY implement the signal.", "type": "string", "const": "opt_in" } ] }, "Span": { "description": "Defines a new Span signal.", "type": "object", "properties": { "annotations": { "description": "Annotations for the attribute or signal.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/SpanAttributeOrGroupRef" } }, "brief": { "description": "A brief description of the attribute or signal.", "type": "string" }, "deprecated": { "description": "Specifies if the semantic convention is deprecated. The string\nprovided as description MUST specify why it's deprecated and/or what\nto use instead. See also stability.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this span should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "kind": { "description": "Specifies the kind of the span.\nNote: only valid if type is span", "$ref": "#/$defs/SpanKindSpec" }, "name": { "description": "The name pattern for the span.", "$ref": "#/$defs/SpanName" }, "note": { "description": "A more elaborate description of the attribute or signal.\nIt defaults to an empty string.", "type": "string" }, "requirement_level": { "description": "The requirement level of the span. Defaults to 'recommended' when omitted.", "anyOf": [ { "$ref": "#/$defs/SignalRequirementLevel" }, { "type": "null" } ] }, "stability": { "description": "Specifies the stability of the attribute or signal.", "$ref": "#/$defs/Stability" }, "type": { "description": "The type of the Span. This denotes the identity\nof the \"shape\" of this span, and must be unique.", "$ref": "#/$defs/SignalId" } }, "additionalProperties": false, "required": [ "type", "kind", "name", "brief", "stability" ] }, "SpanAttributeOrGroupRef": { "description": "A reference to either a span attribute or an attribute group.", "anyOf": [ { "description": "Reference to a span attribute.", "$ref": "#/$defs/SpanAttributeRef" }, { "description": "Reference to an attribute group.", "$ref": "#/$defs/SpanGroupRef" } ] }, "SpanAttributeRef": { "description": "A refinement of an Attribute for a span.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the attribute. These will be\nmerged with annotations from the definition.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "brief": { "description": "Refines the brief description of the attribute.", "type": [ "string", "null" ] }, "examples": { "description": "Refined sequence of example values for the attribute or single example\nvalue. They are required only for string and string array\nattributes. Example values must be of the same type of the\nattribute. If only a single example is provided, it can directly\nbe reported without encapsulating it into a sequence/dictionary.", "anyOf": [ { "$ref": "#/$defs/Examples" }, { "type": "null" } ] }, "note": { "description": "Refines the more elaborate description of the attribute.", "type": [ "string", "null" ] }, "ref": { "description": "Reference an existing attribute by key.", "type": "string" }, "requirement_level": { "description": "Refines the attribute requirement level. Can be \"required\",\n\"conditionally_required\", \"recommended\" or \"opt_in\". When omitted,\nthe original attribute requirement level is used. When set to\n\"conditionally_required\", the string provided as `condition` MUST\nspecify the conditions under which the attribute is required.", "anyOf": [ { "$ref": "#/$defs/RequirementLevel" }, { "type": "null" } ] }, "sampling_relevant": { "description": "Specifies if the attribute is (especially) relevant for sampling\nand thus should be set at span start. It defaults to false.\nNote: this field is experimental.", "type": [ "boolean", "null" ] } }, "additionalProperties": false, "required": [ "ref" ] }, "SpanGroupRef": { "description": "A reference to an attribute group for spans.", "type": "object", "properties": { "ref_group": { "description": "Reference an existing attribute group by id.", "type": "string" } }, "additionalProperties": false, "required": [ "ref_group" ] }, "SpanKindSpec": { "description": "The span kind.", "oneOf": [ { "description": "An internal span.", "type": "string", "const": "internal" }, { "description": "A client span.", "type": "string", "const": "client" }, { "description": "A server span.", "type": "string", "const": "server" }, { "description": "A producer span.", "type": "string", "const": "producer" }, { "description": "A consumer span.", "type": "string", "const": "consumer" } ] }, "SpanName": { "description": "Specification of the span name.", "type": "object", "properties": { "note": { "description": "Required description of how a span name should be created.", "type": "string" } }, "additionalProperties": false, "required": [ "note" ] }, "SpanRefinement": { "description": "A refinement of an existing span.", "type": "object", "properties": { "annotations": { "description": "Additional annotations for the signal.\nNote: This field is currently not propagated during resolution.", "type": "object", "additionalProperties": { "$ref": "#/$defs/YamlValue" } }, "attributes": { "description": "List of attributes that belong to the semantic convention.", "type": "array", "items": { "$ref": "#/$defs/SpanAttributeOrGroupRef" } }, "brief": { "description": "Refines the brief description of the signal.\nNote: This field is currently not propagated during resolution.", "type": [ "string", "null" ] }, "deprecated": { "description": "Specifies if the signal is deprecated.\nNote: This field is currently not propagated during resolution.", "anyOf": [ { "$ref": "#/$defs/Deprecated" }, { "type": "null" } ] }, "entity_associations": { "description": "Which resources this span should be associated with.\n\nThe list is an implicit `one_of` (telemetry must satisfy at least one entry); each entry is an\nentity reference or a nested `one_of`/`all_of` expression.\nNote: This field is currently not propagated during resolution.", "type": "array", "items": { "$ref": "#/$defs/EntityAssociation" } }, "id": { "description": "The ID of the refinement.", "$ref": "#/$defs/SignalId" }, "name": { "description": "Overrides the span name specification from the referenced base span.\nIf set, the entire `name` structure from the refinement replaces the\nbase span's `name`; otherwise, the base span's `name` is inherited.", "anyOf": [ { "$ref": "#/$defs/SpanName" }, { "type": "null" } ] }, "note": { "description": "Refines the more elaborate description of the signal.\nNote: This field is currently not propagated during resolution.", "type": [ "string", "null" ] }, "ref": { "description": "The name of the span being refined.", "$ref": "#/$defs/SignalId" }, "stability": { "description": "Refines the stability of the signal.\nNote: This field is currently not propagated during resolution.", "anyOf": [ { "$ref": "#/$defs/Stability" }, { "type": "null" } ] } }, "additionalProperties": false, "required": [ "id", "ref" ] }, "Stability": { "description": "The level of stability for a definition. Defined in [OTEP-232](https://github.com/open-telemetry/oteps/blob/main/text/0232-maturity-of-otel.md)", "oneOf": [ { "description": "A deprecated definition.", "type": "string", "const": "deprecated", "deprecated": true }, { "description": "A stable definition.", "type": "string", "const": "stable" }, { "description": "A definition in development. Formally known as experimental.", "type": "string", "const": "development" }, { "description": "An alpha definition.", "type": "string", "const": "alpha" }, { "description": "A beta definition.", "type": "string", "const": "beta" }, { "description": "A release candidate definition.", "type": "string", "const": "release_candidate" } ] }, "TemplateTypeSpec": { "description": "Template types.", "oneOf": [ { "description": "A boolean attribute.", "type": "string", "const": "template[boolean]" }, { "description": "A integer attribute.", "type": "string", "const": "template[int]" }, { "description": "A double attribute.", "type": "string", "const": "template[double]" }, { "description": "A string attribute.", "type": "string", "const": "template[string]" }, { "description": "A any attribute.", "type": "string", "const": "template[any]" }, { "description": "An array of strings attribute.", "type": "string", "const": "template[string[]]" }, { "description": "An array of integer attribute.", "type": "string", "const": "template[int[]]" }, { "description": "An array of double attribute.", "type": "string", "const": "template[double[]]" }, { "description": "An array of boolean attribute.", "type": "string", "const": "template[boolean[]]" } ] }, "ValueSpec": { "description": "The different types of values.", "anyOf": [ { "description": "A integer value.", "type": "integer", "format": "int64" }, { "description": "A double value.", "type": "number", "format": "double" }, { "description": "A string value.", "type": "string" }, { "description": "A boolean value.", "type": "boolean" } ] }, "YamlValue": { "type": [ "null", "boolean", "object", "array", "number", "string" ] } } }