Skip to main content

Module otel

Module otel 

Source
Expand description

OpenTelemetry OTLP tracer — init once at launch, read globally.

Call init_tracer from ArclyObservabilityPlugin::on_init. Call opentelemetry::global::shutdown_tracer_provider() in on_shutdown to flush any buffered spans before the process exits.

Structs§

OtelConfig
Configuration for the OTLP span exporter.

Functions§

init_tracer
Initialise the global OpenTelemetry tracer provider with a batch OTLP gRPC exporter. Safe to call once — subsequent calls on the same process are no-ops because set_tracer_provider is idempotent on the global.
parent_context_from
Build an OpenTelemetry Context that represents the parent of the span about to be created for this request.