Skip to main content

Module testing

Module testing 

Source
Expand description

No-op / testing mode for otel-bootstrap.

Enabled by the testing feature flag. Provides [Telemetry::testing], which initialises traces and metrics with in-memory, zero-network exporters so callers can init telemetry in unit and integration tests without running an OTLP collector.

§Example

let handles = otel_bootstrap::Telemetry::testing("my-service");
// use tracing macros freely — no collector required
tracing::info!("hello from test");
handles.shutdown().unwrap();