pub fn build_layer(
service_name: &str,
) -> Result<(BoxedLayer, SdkTracerProvider)>Expand description
Builds the OpenTelemetry tracing bridge layer — REQ-2.3.2 — exported via
OTLP. Unlike targets::typescript’s tracing.ts (separate Jaeger trace
and Prometheus metrics exporters), this target exports over the single
OTLP wire protocol, which modern Jaeger/Prometheus deployments both
ingest via a collector; a deliberate simplification given this crate’s
toolchain already includes opentelemetry-otlp and adding
exporter-specific crates for each backend isn’t otherwise warranted.
Returns the layer (for logger::init_logging to compose into the one
global subscriber tracing allows) alongside the SdkTracerProvider
handle shutdown_tracing needs.