Context

This file tracks compliance for OpenTelemetry context data model and context API requirements in this repository.

Context propagation-specific requirements are tracked in context-propagation.md.

context/README.md checklist

Area Requirement Status Evidence Notes
Context data model Context is immutable; write operations return a new Context Compliant Context.scala, Context.scala, ContextSuite.scala SDK context storage is immutable and updates create new map-backed instances.
Create key CreateKey takes debug name and returns opaque key; same name should not imply same key Compliant Context.scala, ContextKeySuite.scala, Key.scala Keys are generated via Unique token and are non-equal even with same debug name.
Get/Set value Get value by key and set value into Context Compliant Context.scala, Context.scala, ContextSuite.scala Typed get/updated operations are exposed and covered by tests.
Optional global operations Get current Context + attach/detach for implicit context Partial ContextManager.scala, OpenTelemetrySdk.scala, ContextManagerSuite.scala ContextManager.current, scope, and captureScope expose complete-context capture and scoped restoration through the SDK, standalone traces, and all testkits. Restoration uses the same Local as telemetry. Explicit attach/detach tokens remain unexposed; standalone metrics/logs autoconfiguration retains a constant root context.