Skip to main content

otel_tracing_enabled

Function otel_tracing_enabled 

Source
pub fn otel_tracing_enabled() -> bool
Expand description

Returns a boolean indicating if the OTEL tracing layer should be enabled.

It is considered enabled if any of the following environment variables are set and not empty:

  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT

Note that this is overridden if OTEL_SDK_DISABLED is set and not empty.