Skip to main content

Module init

Module init 

Source
Expand description

OpenTelemetry tracing initialization utilities

This module sets up OpenTelemetry tracing and exports spans via OTLP (gRPC or HTTP) to collectors such as Jaeger, Uptrace, or the OTel Collector.

Functionsยง

init_tracing
Initialize OpenTelemetry tracing from configuration and return a layer to be attached to tracing_subscriber.
otel_connectivity_probe
Build a tiny, separate OTLP pipeline and export a single span to verify connectivity. This does not depend on tracing_subscriber; it uses SDK directly.
shutdown_tracing
Gracefully shut down OpenTelemetry tracing. In opentelemetry 0.31 there is no global shutdown_tracer_provider(). Keep a handle to SdkTracerProvider in your app state and call shutdown() during graceful shutdown. This function remains a no-op for compatibility.