Skip to content

symfonic.core.observability.hooks

hooks

NoOpObservabilityHook — zero-overhead default implementation.

Always registered in BaseAgentDeps so that deps.require(ObservabilityHook) never raises.

LLMLifecycleHook

Bases: Protocol

Async instrumentation for LLM call start/end lifecycle.

NoOpObservabilityHook

Zero-overhead default hook. All methods are no-ops.

Always registered in BaseAgentDeps so nodes can safely call deps.require(ObservabilityHook) without risk of MissingCapabilityError.

LSP: signatures match ObservabilityHook protocol exactly.

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.