Attributes
This file tracks compliance for cross-cutting OpenTelemetry attribute requirements in this repository.
common/README.md checklist
| Area | Requirement | Status | Evidence | Notes |
|---|---|---|---|---|
| Attribute value types | Attribute values MUST be one of the AnyValue-compatible primitive/array types | Compliant | ProtoEncoder.scala, ProtoEncoder.scala | OTLP encoding supports boolean/double/string/long and homogeneous primitive arrays for attributes. |
| Attribute key validation | Attribute key MUST be non-null and non-empty | Partial | TelemetryResourceAutoConfigure.scala, TelemetryResourceAutoConfigure.scala | SDK call sites construct attributes directly from parsed key strings; no explicit non-empty-key validation is enforced at this layer. |
| Attribute collection uniqueness | Exported attribute collections MUST contain unique keys (same-key updates overwrite) | Compliant | SdkSpanBackend.scala, SdkLogRecordBuilder.scala, TelemetryResource.scala | Signal/resource paths normalize incoming sets through Attributes and merge semantics before export. |
| Attribute value length limit | If configured, SDK MUST truncate over-limit string/array values | Compliant | LimitedData.scala, LimitedData.scala, LimitedDataSuite.scala | Limiter truncates string and sequence-based attribute values and tests verify truncation behavior. |
| Attribute count limit | If configured, SDK MUST drop attributes beyond count limit | Compliant | LimitedData.scala, LimitedDataSuite.scala, LogsProtoEncoder.scala, SpansProtoEncoder.scala | Extra attributes are dropped and dropped counters are surfaced in exported telemetry. |
| Programmatic configuration | If limits are implemented, SDK MUST allow programmatic configuration | Compliant | SpanLimits.scala, SpanLimits.scala, LogRecordLimits.scala, LogRecordLimits.scala | Span and log record limits are configurable via builder APIs. |
| Exempt entities | Resource and Metrics attributes are exempt from common attribute limits | Compliant | TelemetryResource.scala, SynchronousStorage.scala, AsynchronousStorage.scala | Resource and metric attribute paths do not apply LimitedData-style count/value truncation; metrics handle cardinality separately. |