pub struct TelemetryCfg {
pub enabled: bool,
pub endpoint: String,
pub sample_rate: f64,
pub service_name: String,
pub capture_content: bool,
pub max_content_bytes: usize,
pub timeout_ms: u64,
}Expand description
OTLP span emission ([llm.telemetry]). When enabled, the gateway emits one OpenInference/OTLP
span per metered LLM request to endpoint (an OTLP/HTTP /v1/traces receiver — e.g. evald),
carrying the model, per-tier tokens, computed cost, and server-side TTFT/TPOT/latency already
attached. Because the proxy sits in the request path, this needs no client SDK and is immune
to the import-order / per-framework instrumentor drift that plagues in-process instrumentation.
Emission is fire-and-forget — it never blocks or fails the client response. Off by default.
Fields§
§enabled: boolMaster switch. Default false.
endpoint: StringOTLP/HTTP traces endpoint, e.g. http://127.0.0.1:4318/v1/traces. Required when enabled.
sample_rate: f64Fraction of LLM requests to emit a span for, 0.0–1.0 (deterministic per-trace sampling —
the same trace always gets the same verdict). Default 1.0 (all).
service_name: Stringservice.name resource attribute on emitted spans. Default edgeguard.
capture_content: boolCapture the (DLP-redacted) prompt/response as input.value/output.value on the span. Off by
default — content leaves the gateway only when this is explicitly enabled, and when an
[llm.dlp] engine is configured the captured content is redacted before it is emitted.
max_content_bytes: usizeCap on each captured content field in bytes (truncated past this). Default 8192.
timeout_ms: u64Per-emit timeout for the background POST, in milliseconds. Default 2000.
Trait Implementations§
Source§impl Clone for TelemetryCfg
impl Clone for TelemetryCfg
Source§fn clone(&self) -> TelemetryCfg
fn clone(&self) -> TelemetryCfg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more