Module telemetry

Module telemetry 

Source
Expand description

Lightweight session telemetry — atomic fast-lane counters + periodic aggregation.

All hot-path operations (counter increments, timestamp recording) are lock-free and zero-allocation (~1ns per call). Aggregation only happens periodically on the telemetry lane or at turn boundaries, ensuring no impact on the latency-sensitive audio pipeline.

The number a voice product is judged on is response latency: the time from the user’s end of speech to the model’s first audio byte. It is recorded per turn into LatencyStats — last, min, max, mean, the p50/ p90/p99 of recent turns, and a fixed-bucket histogram — and read through SessionTelemetry::latency or SessionTelemetry::snapshot.

Structs§

LatencyBucket
One bucket of the response-latency histogram.
LatencyStats
Response-latency distribution for the session so far.
SessionTelemetry
Zero-overhead telemetry collector for speech-to-speech sessions.

Constants§

LATENCY_BUCKETS_MS
Upper bounds, in milliseconds, of the response-latency histogram buckets.
LATENCY_RECENT_WINDOW
Number of most-recent samples the percentiles are computed over.