symfonic.core.observability.protocol¶
protocol ¶
Observability protocols -- granular ISP-compliant instrumentation contracts.
Per ADR-PFX-007: defines the instrumentation interfaces that observability
implementations must satisfy. Three granular protocols cover distinct
lifecycle concerns (node, LLM, tool). The composed ObservabilityHook
provides backward compatibility for consumers that need the full interface.
Consumers depend on these protocols, never on concrete hooks.
LLMLifecycleHook ¶
Bases: Protocol
Async instrumentation for LLM call start/end lifecycle.
NodeLifecycleHook ¶
Bases: Protocol
Async instrumentation for graph-node start/end/error lifecycle.
ObservabilityHook ¶
Bases: NodeLifecycleHook, LLMLifecycleHook, ToolLifecycleHook, Protocol
Composed protocol -- union of all lifecycle hooks.
Backward-compatible: any class implementing all 7 methods satisfies this protocol. New consumers should prefer the granular protocols when they only need a subset of methods.
ToolLifecycleHook ¶
Bases: Protocol
Async instrumentation for tool invocation start/end lifecycle.