Skip to main content

Module telemetry

Module telemetry 

Source
Expand description

Telemetry and metrics collection following OpenTelemetry GenAI conventions.

Provides lock-free, zero-allocation metrics collection for:

  • Token usage (input, output, saved, compression ratio)
  • Tool call latency and success rates
  • Search quality metrics (latency, result counts)
  • Embedding inference performance
  • Cache hit/miss rates

Naming follows the OpenTelemetry GenAI Semantic Conventions: https://opentelemetry.io/docs/specs/semconv/gen-ai/

Structs§

Metrics
MetricsSnapshot
Point-in-time snapshot of all metrics.
ToolCallTimer
RAII guard that records tool call latency on drop.

Functions§

global_metrics