Skip to main content

Module metrics

Module metrics 

Source
Expand description

Prometheus metrics for the agentkernel HTTP API and sandbox lifecycle.

All metrics use a dedicated Registry (not the global default) to avoid collisions with any dependency that might also use the prometheus crate.

Functionsยง

dec_active_sandboxes
gather
Encode all registered metrics into Prometheus text exposition format.
inc_active_sandboxes
record_command
Record a command execution (counter + histogram).
record_http_request
Record an HTTP request (counter + histogram).
record_llm_request
Record an LLM API request (counter + token counters).
record_sandbox_lifecycle
Record a sandbox lifecycle operation (counter + histogram).
set_active_sandboxes