OTel

OTel Attributes

Attributes reserved for OpenTelemetry

AttributeTypeDescriptionExamplesStability
otel.span.sampling_resultstringThe result value of the sampler for this spanDROP; RECORD_ONLY; RECORD_AND_SAMPLEDevelopment
otel.status_codestringName of the code, either “OK” or “ERROR”. MUST NOT be set if the status code is UNSET.OK; ERRORStable
otel.status_descriptionstringDescription of the Status if it has a value, otherwise not set.resource not foundStable

otel.span.sampling_result has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
DROPThe span is not sampled and not recordingDevelopment
RECORD_AND_SAMPLEThe span is sampled and recordingDevelopment
RECORD_ONLYThe span is not sampled, but recordingDevelopment

otel.status_code has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
ERRORThe operation contains an error.Stable
OKThe operation has been validated by an Application developer or Operator to have completed successfully.Stable

OTel Component Attributes

Attributes used for OpenTelemetry component self-monitoring

AttributeTypeDescriptionExamplesStability
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [1]otlp_grpc_span_exporter/0; custom-nameDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [2]batching_span_processor; com.example.MySpanExporterDevelopment

[1] otel.component.name: Implementations SHOULD ensure a low cardinality for this attribute, even across application or SDK restarts. E.g. implementations MUST NOT use UUIDs as values for this attribute.

Implementations MAY achieve these goals by following a <otel.component.type>/<instance-counter> pattern, e.g. batching_span_processor/0. Hereby otel.component.type refers to the corresponding attribute value of the component.

The value of instance-counter MAY be automatically assigned by the component and uniqueness within the enclosing SDK instance MUST be guaranteed. For example, <instance-counter> MAY be implemented by using a monotonically increasing counter (starting with 0), which is incremented every time an instance of the given component type is started.

With this implementation, for example the first Batching Span Processor would have batching_span_processor/0 as otel.component.name, the second one batching_span_processor/1 and so on. These values will therefore be reused in the case of an application restart.

[2] otel.component.type: If none of the standardized values apply, implementations SHOULD use the language-defined name of the type. E.g. for Java the fully qualified classname SHOULD be used in this case.


otel.component.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batching_span_processorThe builtin SDK Batching Span ProcessorDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
simple_span_processorThe builtin SDK Simple Span ProcessorDevelopment

OTel Scope Attributes

Attributes used by non-OTLP exporters to represent OpenTelemetry Scope’s concepts.

AttributeTypeDescriptionExamplesStability
otel.scope.namestringThe name of the instrumentation scope - (InstrumentationScope.Name in OTLP).io.opentelemetry.contrib.mongodbStable
otel.scope.versionstringThe version of the instrumentation scope - (InstrumentationScope.Version in OTLP).1.0.0Stable

Deprecated OTel Library Attributes

Describes deprecated otel.library attributes.

AttributeTypeDescriptionExamplesStability
otel.library.namestringDeprecated. Use the otel.scope.name attributeio.opentelemetry.contrib.mongodbDeprecated
Use the otel.scope.name attribute.
otel.library.versionstringDeprecated. Use the otel.scope.version attribute.1.0.0Deprecated
Use the otel.scope.version attribute.