bb_runtime/telemetry/mod.rs
1//! Optional OpenTelemetry layer constructors for the engine's
2//! `tracing::` spans.
3//!
4//! The engine emits `tracing::debug_span!` calls on every poll
5//! phase and on internal dispatch hot-paths regardless of feature
6//! flags. To export those spans to an OTLP collector, opt in to
7//! the `tracing-otel` feature and call `otel::install_otlp_layer`
8//! from your host crate's startup.
9//!
10//! The framework deliberately does NOT auto-install the subscriber
11//! - the host owns the global `tracing::dispatcher::set_global_default`
12//! handle. Build the OTel layer here, then compose it with whatever
13//! other layers (fmt, json, etc.) your host uses.
14
15#[cfg(feature = "tracing-otel")]
16pub mod otel;