Expand description
Observability layer — OpenTelemetry tracing, structured logging, Prometheus metrics.
All components are feature-gated for zero overhead when disabled:
tracing-subscriber: console logging — installs a fmt/EnvFilter subscriber viaTelemetryConfig::init(thetracingfacade itself is always available)metrics: Prometheus metric definitions and exportotel-otlp: OTLP trace and metric export to any OTel collectorotel-gcp: Google Cloud-native trace and metric export (Cloud Trace + Cloud Monitoring)
Re-exports§
pub use metrics_exporter_prometheus as metrics_exporter;
Modules§
- logging
- Structured logging helpers.
- metrics
- Prometheus metric definitions — counters, histograms, gauges.
- spans
- OpenTelemetry span definitions for session operations.
Structs§
- Exporters
- The exporters a
TelemetryConfigasks for, built but not yet attached to a subscriber: for an application that builds its own subscriber (to add layers of its own) and attachesExporters::layerto it when theotel-basefeature is enabled. - Telemetry
Config - Telemetry configuration.
- Telemetry
Guard - Guard that keeps telemetry systems alive while held. Drop this to flush and shutdown OTel exporters.