Expand description
Opt-in OTLP tracing exporter for the engine’s spans
(, gated by the tracing-otel
feature).
Construct a layer with install_otlp_layer and compose it into
your host’s tracing_subscriber::Registry. The framework
deliberately does NOT install a global subscriber - span
emission, runtime ownership, and dispatch-default registration
all stay with the host.
§Example
ⓘ
use tracing_subscriber::prelude::*;
let otel = bytesandbrains::telemetry::otel::install_otlp_layer(
"my-service",
"http://localhost:4317",
)?;
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer())
.with(otel)
.init();Structs§
- Install
Error - Error returned when constructing the OTLP layer fails.
Functions§
- install_
otlp_ layer - Build an OTLP-exporting
tracinglayer that the host can.with(...)into atracing_subscriber::Registry. Spans emitted by the engine (engine.poll,engine.phase*,engine.invoke_one,engine.deliver_fill, …) propagate to the configured collector endpoint.