Module metrics

Module metrics 

Source
Expand description

Prometheus metric definitions for agent lifecycle — counters, histograms.

Feature-gated behind metrics. When disabled, all functions compile to no-ops.

Functions§

record_agent_completed
Record that an agent has completed, with its duration.
record_agent_error
Record an agent error.
record_agent_started
Record that an agent has started.
record_agent_tool_dispatch
Record an agent-as-tool dispatch with duration.
record_agent_tool_dispatched
Record that a tool was dispatched by an agent.
record_agent_tool_duration
Record tool execution duration for an agent.
record_agent_transfer
Record an agent transfer from one agent to another.
record_event_loop_lag
Record event loop lag (skipped events).
record_extraction_duration
Record extraction duration.
record_llm_call
Record LLM call with duration and token counts.
record_persistence_duration
Record session persistence duration.
record_phase_transition
Record a phase transition.
record_token_usage
Record total token usage.