Skip to main content
Telemetry is the per-request event that the metrics worker builds and ships off the critical path. Each event captures everything needed to analyze cost, latency, routing, and policy decisions. Events are exported over OpenTelemetry (OTLP), and TrustLens forwarding is opt-in.

Configuration

Telemetry is configured globally by environment and refined per gateway. Per gateway, telemetry can define its own exporters, static extra_params appended to every event, trace toggles, and a header_mapping that copies inbound headers into event fields.

Exporters

A gateway’s telemetry.exporters[] selects where its events go. Per-gateway exporters are merged with (not a replacement for) the process-level defaults: Process-level OTLP defaults come from the standard OTEL_EXPORTER_OTLP_* environment variables; a gateway opts in by adding an otlp exporter.

The event

Events are versioned (schema_version, currently 3) and carry a kind of llm or mcp. Each includes, among others:

Using the stream

Point any OTLP collector at the exporter endpoint to build dashboards, billing, or anomaly detection; or enable the TrustLens integration to forward events to NeuralTrust’s analytics. The attempts and policy_chain arrays make it possible to reconstruct exactly how each request was routed and which policies fired. Once forwarded to NeuralTrust, these events also power Telemetry Alerts — predefined and custom detection rules (elevated error rate, latency degradation, authentication anomalies, rate-limit abuse, upstream-provider errors) that raise deduplicated alerts and forward them to your SIEM.