Built-In Telemetry. Every Layer.
Metrics, tracing, and logging across your entire data stack. Export to Datadog or Prometheus with no agents to deploy and no code to change.
Built for the Hot Path
Traditional metrics libraries add microseconds of latency per operation. Eden's fast-telemetry engine adds nanoseconds.
80x faster than standard tooling via thread-sharded counters
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
Metric Primitives
Four core metric types purpose-built for proxy workloads. Thread-sharded, lock-free, and cache-padded — each designed to never contend on the critical path.
Counter
~2ns 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 zero overhead 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 zero 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
Complete visibility across every layer of the Eden stack. From gateway 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
Full Observability, Zero Overhead
See every query, command, and request across your entire data stack, without slowing it down.