Skip to main content

fast_telemetry_export/
lib.rs

1//! Export adapters for fast-telemetry metrics.
2//!
3//! This crate provides the I/O layer for getting fast-telemetry metrics out of your
4//! process: DogStatsD over UDP, OTLP over HTTP/protobuf, span export, and
5//! stale-series sweeping.
6//!
7//! Exporters are generic — they accept closures for metric serialization so
8//! they work with any metrics struct, not just a specific `AllMetrics` type.
9//!
10//! # Configuration highlights
11//!
12//! - OTLP metrics and span exporters support custom `service.name`,
13//!   instrumentation scope names, additional resource attributes, per-request
14//!   headers, and request timeouts.
15//! - OTLP exporters gzip-compress larger protobuf payloads automatically and
16//!   use exponential backoff after transport failures.
17//! - The span exporter also exposes `max_batch_size` to bound work per cycle.
18//! - The stale-series sweeper expects the caller to invoke
19//!   [`fast_telemetry::advance_cycle`] once per sweep and then call each dynamic
20//!   metric's `evict_stale(...)` method.
21//!
22//! # Features
23//!
24//! - `dogstatsd` (default) — DogStatsD UDP exporter
25//! - `otlp` (default) — OTLP HTTP/protobuf metrics and span exporters
26
27#[cfg(feature = "dogstatsd")]
28pub mod dogstatsd;
29
30#[cfg(feature = "otlp")]
31pub mod otlp;
32
33#[cfg(feature = "otlp")]
34pub mod spans;
35
36pub mod sweeper;