Expand description
Observability — tracing layer stack + (feature-gated) OpenTelemetry
OTLP exporter wiring.
Two entry points:
-
init— install the global subscriber. Call once at daemon startup before any other tracing event fires. Respects the following env vars:Var Default Effect RUST_LOGinfoEnvFilterdirectivesOTEL_LOG_FORMATcompactcompact/pretty/jsonOTEL_SERVICE_NAMEpost-cortexOTel service.name attr OTEL_SERVICE_VERSIONcrate version OTel service.version OTEL_EXPORTER_OTLP_ENDPOINTunset When set + otelfeature on, spans + metrics export to this gRPC endpoint -
shutdown— call before process exit so the OTLP exporter flushes its queue.
When the otel feature is OFF, init still wires the
fmt::Subscriber layer + EnvFilter — only the OTLP layer
disappears. Library users that disable OTel pay nothing.
Enums§
- Tracing
Init Error - Errors raised by
init.