agrag.observability
OpenTelemetry wiring for the ingestion layer.
This module imports only opentelemetry-api. The SDK and exporters stay in
the optional observability extra and are never imported here; a caller
wires them before opening a graph. The tracer is constructor-injected, never
ambient: get_tracer(None) returns an explicit no-op tracer instead of
reaching the global TracerProvider.
Functions:
- get_tracer – Return a usable tracer.
- record_stage_failure – Record
excas an error on the current span, then return its ids. - record_swallowed_exception – Record
excon the current span without marking it errored. - stage_failure_context – Return the current span's trace and span id as hex, or (None, None).
Attributes: