Semantic conventions for OpenTelemetry SDK metrics

Status: Development

This document describes metrics emitted by the OpenTelemetry SDK components themselves about their internal state.

Span metrics

Metric: otel.sdk.span.live

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.span.liveUpDownCounter{span}The number of created spans for which the end operation has not been called yet [1]Development

[1]: For spans with recording=true: Implementations MUST record both otel.sdk.span.live and otel.sdk.span.ended. For spans with recording=false: If implementations decide to record this metric, they MUST also record otel.sdk.span.ended.

AttributeTypeDescriptionExamplesRequirement LevelStability
otel.span.sampling_resultstringThe result value of the sampler for this spanDROP; RECORD_ONLY; RECORD_AND_SAMPLERecommendedDevelopment

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

Metric: otel.sdk.span.ended

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.span.endedCounter{span}The number of created spans for which the end operation was called [1]Development

[1]: For spans with recording=true: Implementations MUST record both otel.sdk.span.live and otel.sdk.span.ended. For spans with recording=false: If implementations decide to record this metric, they MUST also record otel.sdk.span.live.

AttributeTypeDescriptionExamplesRequirement LevelStability
otel.span.sampling_resultstringThe result value of the sampler for this spanDROP; RECORD_ONLY; RECORD_AND_SAMPLERecommendedDevelopment

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

Metric: otel.sdk.processor.span.queue.size

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.span.queue.sizeUpDownCounter{span}The number of spans in the queue of a given instance of an SDK span processor [1]Development

[1]: Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.

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

[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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.processor.span.queue.capacity

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.span.queue.capacityUpDownCounter{span}The maximum number of spans the queue of a given instance of an SDK span processor can hold [1]Development

[1]: Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.

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

[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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.processor.span.processed

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.span.processedCounter{span}The number of spans for which the processing has finished, either successful or failed [1]Development

[1]: For successful processing, error.type MUST NOT be set. For failed processing, error.type MUST contain the failure cause. For the SDK Simple and Batching Span Processor a span is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringA low-cardinality description of the failure reason. SDK Batching Span Processors MUST use queue_full for spans dropped due to a full queue. [1]queue_fullRecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.span.inflight

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.span.inflightUpDownCounter{span}The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause.

AttributeTypeDescriptionExamplesRequirement LevelStability
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [1]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [2]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [3]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [4]80; 8080; 443Recommended when applicableStable

[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.

[3] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[4] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.span.exported

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.span.exportedCounter{span}The number of spans for which the export has finished, either successful or failed [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with rejected_spans), rejected spans MUST count as failed and only non-rejected spans count as success. If no rejection reason is available, rejected SHOULD be used as value for error.type.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringDescribes a class of error the operation ended with. [1]rejected; timeout; 500; java.net.UnknownHostExceptionRecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [4]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [5]80; 8080; 443Recommended when applicableStable

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.

[4] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[5] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Log metrics

Metric: otel.sdk.log.created

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.log.createdCounter{log_record}The number of logs submitted to enabled SDK LoggersDevelopment

Metric: otel.sdk.processor.log.queue.size

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.log.queue.sizeUpDownCounter{log_record}The number of log records in the queue of a given instance of an SDK log processor [1]Development

[1]: Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record Processor.

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

[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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.processor.log.queue.capacity

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.log.queue.capacityUpDownCounter{log_record}The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold [1]Development

[1]: Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log Record Processor.

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

[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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.processor.log.processed

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.processor.log.processedCounter{log_record}The number of log records for which the processing has finished, either successful or failed [1]Development

[1]: For successful processing, error.type MUST NOT be set. For failed processing, error.type MUST contain the failure cause. For the SDK Simple and Batching Log Record Processor a log record is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringA low-cardinality description of the failure reason. SDK Batching Log Record Processors MUST use queue_full for log records dropped due to a full queue. [1]queue_fullRecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.log.inflight

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.log.inflightUpDownCounter{log_record}The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause.

AttributeTypeDescriptionExamplesRequirement LevelStability
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [1]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [2]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [3]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [4]80; 8080; 443Recommended when applicableStable

[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.

[3] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[4] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.log.exported

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.log.exportedCounter{log_record}The number of log records for which the export has finished, either successful or failed [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with rejected_log_records), rejected log records MUST count as failed and only non-rejected log records count as success. If no rejection reason is available, rejected SHOULD be used as value for error.type.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringDescribes a class of error the operation ended with. [1]rejected; timeout; 500; java.net.UnknownHostExceptionRecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [4]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [5]80; 8080; 443Recommended when applicableStable

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.

[4] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[5] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric metrics

Metric: otel.sdk.exporter.metric_data_point.inflight

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.metric_data_point.inflightUpDownCounter{data_point}The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause.

AttributeTypeDescriptionExamplesRequirement LevelStability
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [1]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [2]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [3]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [4]80; 8080; 443Recommended when applicableStable

[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.

[3] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[4] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.metric_data_point.exported

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.metric_data_point.exportedCounter{data_point}The number of metric data points for which the export has finished, either successful or failed [1]Development

[1]: For successful exports, error.type MUST NOT be set. For failed exports, error.type MUST contain the failure cause. For exporters with partial success semantics (e.g. OTLP with rejected_data_points), rejected data points MUST count as failed and only non-rejected data points count as success. If no rejection reason is available, rejected SHOULD be used as value for error.type.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringDescribes a class of error the operation ended with. [1]rejected; timeout; 500; java.net.UnknownHostExceptionRecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [4]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [5]80; 8080; 443Recommended when applicableStable

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.

[4] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[5] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Operation Metrics

Metric: otel.sdk.metric_reader.collection.duration

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries with a single bucket with no boundaries.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.metric_reader.collection.durationHistogramsThe duration of the collect operation of the metric reader. [1]Development

[1]: For successful collections, error.type MUST NOT be set. For failed collections, error.type SHOULD contain the failure cause. It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case error.type SHOULD be set to any of the failure causes.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringDescribes a class of error the operation ended with. [1]timeout; java.net.UnknownHostException; server_certificate_invalid; 500RecommendedStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]batching_span_processor; com.example.MySpanExporterRecommendedDevelopment

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

Metric: otel.sdk.exporter.operation.duration

This metric is recommended.

This metric SHOULD be specified with ExplicitBucketBoundaries with a single bucket with no boundaries.

NameInstrument TypeUnit (UCUM)DescriptionStability
otel.sdk.exporter.operation.durationHistogramsThe duration of exporting a batch of telemetry records. [1]Development

[1]: This metric defines successful operations using the full success definitions for http and grpc. Anything else is defined as an unsuccessful operation. For successful operations, error.type MUST NOT be set. For unsuccessful export operations, error.type MUST contain a relevant failure cause.

AttributeTypeDescriptionExamplesRequirement LevelStability
error.typestringDescribes a class of error the operation ended with. [1]rejected; timeout; 500; java.net.UnknownHostExceptionConditionally Required If operation has ended with an errorStable
http.response.status_codeintThe HTTP status code of the last HTTP request performed in scope of this export call.200Recommended when applicableStable
otel.component.namestringA name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance. [2]otlp_grpc_span_exporter/0; custom-nameRecommendedDevelopment
otel.component.typestringA name identifying the type of the OpenTelemetry component. [3]otlp_grpc_span_exporter; com.example.MySpanExporterRecommendedDevelopment
rpc.grpc.status_codeintThe gRPC status code of the last gRPC requests performed in scope of this export call.0; 1; 2Recommended when applicableDevelopment
server.addressstringServer domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [4]example.com; 10.1.2.80; /tmp/my.sockRecommended when applicableStable
server.portintServer port number. [5]80; 8080; 443Recommended when applicableStable

[1] error.type: The error.type SHOULD be predictable, and SHOULD have low cardinality.

When error.type is set to a type (e.g., an exception type), its canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of error.type within one instrumentation library SHOULD be low. Telemetry consumers that aggregate data from multiple instrumentation libraries and applications should be prepared for error.type to have high cardinality at query time when no additional filters are applied.

If the operation has completed successfully, instrumentations SHOULD NOT set error.type.

If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), it’s RECOMMENDED to:

  • Use a domain-specific attribute
  • Set error.type to capture all errors, regardless of whether they are defined within the domain-specific set or not.

[2] 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.

[3] 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.

[4] server.address: When observed from the client side, and when communicating through an intermediary, server.address SHOULD represent the server address behind any intermediaries, for example proxies, if it’s available.

[5] server.port: When observed from the client side, and when communicating through an intermediary, server.port SHOULD represent the server port behind any intermediaries, for example proxies, if it’s available.


error.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
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

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_log_processorThe builtin SDK batching log record processorDevelopment
batching_span_processorThe builtin SDK batching span processorDevelopment
otlp_grpc_log_exporterOTLP log record exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_metric_exporterOTLP metric exporter over gRPC with protobuf serializationDevelopment
otlp_grpc_span_exporterOTLP span exporter over gRPC with protobuf serializationDevelopment
otlp_http_json_log_exporterOTLP log record exporter over HTTP with JSON serializationDevelopment
otlp_http_json_metric_exporterOTLP metric exporter over HTTP with JSON serializationDevelopment
otlp_http_json_span_exporterOTLP span exporter over HTTP with JSON serializationDevelopment
otlp_http_log_exporterOTLP log record exporter over HTTP with protobuf serializationDevelopment
otlp_http_metric_exporterOTLP metric exporter over HTTP with protobuf serializationDevelopment
otlp_http_span_exporterOTLP span exporter over HTTP with protobuf serializationDevelopment
periodic_metric_readerThe builtin SDK periodically exporting metric readerDevelopment
simple_log_processorThe builtin SDK simple log record processorDevelopment
simple_span_processorThe builtin SDK simple span processorDevelopment

rpc.grpc.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
0OKDevelopment
1CANCELLEDDevelopment
2UNKNOWNDevelopment
3INVALID_ARGUMENTDevelopment
4DEADLINE_EXCEEDEDDevelopment
5NOT_FOUNDDevelopment
6ALREADY_EXISTSDevelopment
7PERMISSION_DENIEDDevelopment
8RESOURCE_EXHAUSTEDDevelopment
9FAILED_PRECONDITIONDevelopment
10ABORTEDDevelopment
11OUT_OF_RANGEDevelopment
12UNIMPLEMENTEDDevelopment
13INTERNALDevelopment
14UNAVAILABLEDevelopment
15DATA_LOSSDevelopment
16UNAUTHENTICATEDDevelopment