symfonic.observability.otel.propagation¶
propagation ¶
ContextVar carriers for the OTEL exporter.
Stores the currently-active root span and the resolved tenant scope so
child-span helpers can populate identity attributes without threading
state through every emit site. Pure contextvars -- no OTEL imports.
RunSpanContext
dataclass
¶
Per-run state shared across child-span helpers.
The OTEL Context itself is propagated implicitly via
contextvars by the OTEL SDK; this carrier holds the symfonic
identifiers needed to populate symfonic.* attributes on every
child span. Kept frozen so accidental mutation is impossible.
get_run_context ¶
reset_run_context ¶
Reset the active run context using a token from set_run_context.