Instrumentation Scope
This file tracks compliance for cross-cutting OpenTelemetry instrumentation scope requirements in this repository.
common/instrumentation-scope.md checklist
| Area | Requirement | Status | Evidence | Notes |
|---|---|---|---|---|
| Scope tuple model | Instrumentation scope is defined by (name, version, schema_url, attributes) with optional fields |
Compliant | InstrumentationScope.scala, InstrumentationScope.scala, InstrumentationScopeSuite.scala | SDK model and builder carry all four tuple fields, including optional version/schema URL and attributes. |
| Scope attributes propagation | Optional instrumentation scope attributes provide additional scope information | Compliant | InstrumentationScope.scala, ProtoEncoder.scala, ProtoEncoderSuite.scala | Scope attributes are part of the scope object and are encoded into OTLP InstrumentationScope.attributes. |
| Scope uniqueness in SDK cache keys | Instrumentation scope tuple SHOULD uniquely identify the logical telemetry-emitting unit | Compliant | InstrumentationScope.scala, ComponentRegistry.scala, ComponentRegistry.scala | Component instances are keyed by full InstrumentationScope, including attributes, so distinct tuples map to distinct SDK components. |
| Scope name recommendation | Instrumentation scope name SHOULD be specified | Partial | InstrumentationScope.scala, InstrumentationScope.scala, InstrumentationScopeSuite.scala | SDK permits empty names (InstrumentationScope.empty and unrestricted builder input), so the SHOULD recommendation is not enforced by validation. |
| Scope selects telemetry API objects | Instrumentation scope is used to obtain Tracer, Meter, or Logger | Compliant | SdkLoggerBuilder.scala, SdkMeterBuilder.scala, SdkTracerBuilder.scala | Logger/Meter/Tracer builders create SDK instances associated with instrumentation scope identity. |
| Logs scope | Name/version/schema_url identify telemetry origin | Compliant | SdkLoggerBuilder.scala, LogsProtoEncoder.scala, InstrumentationScope.scala | Logger builder captures scope identity; OTLP encoding preserves scope and schema URL. |
| Metrics scope | Name/version/schema_url identify telemetry origin | Compliant | SdkMeterBuilder.scala, MetricData.scala, MetricsProtoEncoder.scala | Meter scope and schema URL are carried through metric data and OTLP export. |
| Trace scope | Name/version/schema_url identify telemetry origin | Compliant | SdkTracerBuilder.scala, SpanData.scala, SpansProtoEncoder.scala | Scope identity and schema URL are preserved from tracer construction to OTLP export. |