Module telemetry

Module telemetry 

Source
Expand description

Agent-level observability — OpenTelemetry tracing, structured logging, Prometheus metrics.

Mirrors the wire crate’s telemetry layer but for agent lifecycle operations. All components are feature-gated for zero overhead when disabled:

  • tracing-support: OTel spans and structured logging
  • metrics: Prometheus metric definitions

Re-exports§

pub use setup::TelemetrySetup;

Modules§

logging
Structured logging helpers for agent lifecycle.
metrics
Prometheus metric definitions for agent lifecycle — counters, histograms.
setup
OTLP exporter setup helpers for agent-level telemetry.
spans
OpenTelemetry span definitions for agent lifecycle operations.

Structs§

TelemetryMiddleware
Auto-registered middleware that calls telemetry functions. Zero-overhead when tracing-support and metrics features are disabled (all telemetry functions compile to no-ops).