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, ClickHouse native TCP,
5//! span export, and 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//! - `clickhouse` — ClickHouse native-protocol metrics exporter, including
27//! first-party rows and OTel-standard table support (via [`klickhouse`])
28
29#[cfg(feature = "clickhouse")]
30pub mod clickhouse;
31
32#[cfg(feature = "dogstatsd")]
33pub mod dogstatsd;
34
35#[cfg(feature = "otlp")]
36pub mod otlp;
37
38#[cfg(feature = "otlp")]
39pub mod spans;
40
41pub mod sweeper;