symfonic.observability.otel.framework_bridge¶
framework_bridge ¶
Bridges FrameworkObservabilityHook events into OTEL spans.
Implements the FrameworkObservabilityHook protocol
(src/symfonic/agent/observability.py) and forwards each event into
the tracer's recorder. Each method is wrapped in a try/except so a
bridge bug never crashes the engine's memory pipeline.
CONTAINS opentelemetry imports transitively via OTelTracer.
Loaded only through OTelExporter.build().
FrameworkBridge ¶
Translate FrameworkObservabilityHook callbacks into spans.
Source code in src/symfonic/observability/otel/framework_bridge.py
on_consolidation_complete
async
¶
Emit symfonic.consolidation carrying the reported latency.
Source code in src/symfonic/observability/otel/framework_bridge.py
on_hydration_complete
async
¶
Emit symfonic.hydration carrying the reported latency.
Source code in src/symfonic/observability/otel/framework_bridge.py
on_routing_complete
async
¶
on_routing_complete(
tenant_id: str,
query: str,
tools_selected: list[str],
latency_ms: float,
) -> None
Emit symfonic.tool_routing carrying the reported latency.
Source code in src/symfonic/observability/otel/framework_bridge.py
on_token_budget_computed
async
¶
on_token_budget_computed(
tenant_id: str,
total_tool_tokens: int,
filtered_tool_tokens: int,
savings_pct: float,
) -> None
Emit symfonic.token_budget carrying budget telemetry.