Expand description
Tokio-based transport for the rolly observability crate.
Provides TokioExporter for batching and shipping OTLP telemetry
over HTTP, plus convenience functions for one-liner telemetry setup.
Modules§
Structs§
- Counter
- A monotonic u64 counter. Clone is cheap (Arc).
- Exporter
Config - Configuration for the exporter.
- Gauge
- A last-value f64 gauge. Clone is cheap (Arc).
- Histogram
- A histogram with client-side bucketing. Clone is cheap (Arc).
- Layer
Config - Configuration for building telemetry layers.
- Metrics
Export Config - Configuration for metrics export encoding.
- Null
Sink - No-op sink that discards all telemetry data.
- Telemetry
Config - Configuration for the telemetry stack.
- Telemetry
Guard - Guard that flushes pending telemetry on drop.
- Tokio
Exporter - Handle to the exporter background task.
- UseMetrics
State - Stateful baseline for USE metrics polling.
Enums§
- Backpressure
Strategy - Configures behavior when the telemetry channel is full.
- Export
Message - Message types sent to the exporter background task.
- Init
Error - Errors returned by
try_init_global. - Start
Error - Errors that can occur when starting the exporter.
Traits§
- Telemetry
Sink - Sink for encoded OTLP protobuf payloads.
Functions§
- build_
layer - Build telemetry layers without installing a global subscriber.
- collect_
and_ encode_ metrics - Collect current metric snapshots and encode as OTLP protobuf.
- collect_
use_ metrics - Poll USE metrics once.
- counter
- Get or create a named counter from the global registry.
- gauge
- Get or create a named gauge from the global registry.
- histogram
- Get or create a named histogram from the global registry.
- increment_
dropped_ total - Increment the global telemetry drop counter.
- init_
global_ once - Initialize the full telemetry stack and set the global subscriber.
- spawn_
metrics_ loop - Start the metrics aggregation loop as a background tokio task.
- telemetry_
dropped_ total - Return the total number of telemetry messages dropped due to a full channel.
- try_
init_ global - Same as
init_global_once, but returns an error instead of panicking.