el-telemetry — content-free metrics collector
A one-way, downstream subscriber that folds content-free
el_core::DomainEvents into performance snapshots (ADR-007).
It depends on el-core and nothing depends on it, and it has no network
channel of its own. Because it can only ever read the numeric and enum fields of
events that are already content-free by construction, "no user content in
telemetry" is structural — there is no code path by which a prompt or response
could reach a metric.
What it provides
MetricsCollector— subscribes to the domain-event stream and maintains a running snapshot. Callobserve(&envelope)per event andsnapshot()to read.TelemetrySnapshot— aCopystruct of counters and gauges:prefill_tps,decode_tps,ttft_ms,peak_bytes,tokens_generated,compressions,safety_violations.
peak_bytes is a monotonic high-water mark — it only ever rises across the
events it observes.
Usage
The collector sees only numeric events from a session, whether that session is
the local Qwen2.5 0.5B path or another LlmProvider; prompts and responses
never enter telemetry.
use ;
use MetricsCollector;
let mut collector = new;
// Example events from a local Qwen2.5 0.5B prefill/decode pass.
collector.observe;
collector.observe;
let snap = collector.snapshot;
assert_eq!;
assert_eq!;
Place in the workspace
In a full build, the runtime drains EventEnvelopes from an InferenceSession
(or a cloud CloudProvider's event sink) and feeds them here. This crate is the
read-only end of that pipeline.
Status
Implemented and tested.
Part of the Edge Intelligence workspace. Realizes ADR-007; see the Telemetry & Privacy context.