Understand AI and data traffic with policy, cost, and routing context.
Eve records what happened in the same path that governed the request, so telemetry includes who called, what was routed, what policy did, and where cost came from.
Built for gateway traffic
Eve keeps telemetry close to the request path, with lightweight primitives for high-volume proxy workloads and richer analysis outside the hot path.
Thread-sharded counters for high-volume request tracking
All metric primitives are pre-allocated and cache-line padded
10μs to 10s latency tiers for per-command tracking
Per-thread bounded distribution buffers for DogStatsD export
Metrics designed for the gateway path
Four core metric types purpose-built for proxy workloads. Thread-sharded, lock-free, and cache-padded so common request counters stay lightweight.
Counter
Low-latency incrementThread-sharded CachePadded<AtomicIsize> with power-of-two bitmask indexing. Supports inc(), add(), sum(), and swap() for delta export.
Gauge
Atomic set/getCachePadded<AtomicI64> for integer values and AtomicU64 bit-representation for f64. Set/get only — no inc/dec to prevent misuse.
Histogram
O(1) bucket lookupFixed-bucket with thread-sharded Counter per bucket. Default latency buckets from 10μs to 10s across 13 tiers.
Distribution
Lock-free recordThread-local bounded ring buffers (500 samples default) for DogStatsD distribution export. Lock-free recording with drain(), count(), sum(), min(), max(), mean().
Label Support
O(1) array-based lookup via the LabelEnum trait. Counters, gauges, and histograms all support labeled variants with predictable per-metric access.
Runtime-labeled metrics with canonicalized BTreeMap label sets. Automatic stale series eviction with configurable cycle thresholds to prevent unbounded cardinality.
Export & Distributed Tracing
Plug into your existing observability stack. No proprietary formats, no vendor lock-in.
DogStatsD Export
UDP-based export at configurable intervals (default 10s). Max packet size of 8000 bytes with multi-value distribution batching and service tag support.
- Delta temporality with swap()-based counter export
- Multi-value distribution batching for efficient transfer
- Service name and custom tag injection
- FastMetricsExportState for stale series eviction (default 6 cycles)
Prometheus Export
Full Prometheus text exposition format with HELP and TYPE headers. Cumulative temporality for seamless scraping by Prometheus, Grafana Agent, or any compatible collector.
- Standard text exposition with HELP/TYPE metadata
- Cumulative temporality for standard Prometheus scraping
- Histogram bucket boundaries with _le labels
- Label-aware output with proper escaping and ordering
OpenTelemetry Tracing
Distributed tracing with automatic context propagation across every proxy hop. The #[with_telemetry] proc macro instruments functions with minimal boilerplate.
- Automatic span creation and context propagation
- MetricsMiddleware for Actix-web HTTP routes
- OTLP-compatible collector export
- Trace correlation with proxy metrics
Structured Logging
Two-tier filtering system with compile-time feature flags and runtime level control via EDEN_LOG_LEVEL. Audience classification routes logs to the right destination.
- Compile-time feature flags to eliminate dead code paths
- Runtime EDEN_LOG_LEVEL for dynamic verbosity control
- Audience classification: Internal, Client, Both
- Structured key-value fields for machine parsing
Eight metrics categories
Gateway-level visibility across the Eden stack, from lifecycle events to per-command proxy latency to migration dual-write health.
Gateway lifecycle, config reloads, uptime
Token usage, provider latency, streaming metrics
Auth attempts, RBAC evaluations, JWT validation
Connection state, health checks, pool utilization
Per-command latency, throughput, error rates
Protocol-level bytes, connection counts, metadata collection
Request patterns, hot key tracking, fanout metrics
Dual-write latency, replay queue depth, divergence counts
Added latency per proxied operation, inclusive of all telemetry collection
Observability from the path that governs access.
See requests, commands, models, policies, and costs together in the gateway context.