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 completed (no-op without metrics feature).
record_agent_error
Record an agent error (no-op without metrics feature).
record_agent_started
Record that an agent has started (no-op without metrics feature).
record_agent_tool_dispatch
Record agent-as-tool dispatch (no-op without metrics feature).
record_agent_tool_dispatched
Record a tool dispatch (no-op without metrics feature).
record_agent_tool_duration
Record tool execution duration (no-op without metrics feature).
record_agent_transfer
Record an agent transfer (no-op without metrics feature).
record_event_loop_lag
Record event loop lag (no-op without metrics feature).
record_extraction_duration
Record extraction duration (no-op without metrics feature).
record_llm_call
Record LLM call (no-op without metrics feature).
record_persistence_duration
Record session persistence duration (no-op without metrics feature).
record_phase_transition
Record a phase transition (no-op without metrics feature).
record_token_usage
Record total token usage (no-op without metrics feature).