OpenTelemetry directives

otel_trace

Enables or controls tracing when the compatible OpenTelemetry module is installed; configure exporter and sampling separately.

Formal Syntax & Structure

nginx syntaxnginx
otel_trace on | off | $variable;

Parameters & Attributes

NameTypeDescription
modeon | off | $variableEnable/disable trace recording, or evaluate a variable to select on/off. Default off; bound sampling and avoid sensitive attributes.

Working Example

Example Snippetnginx
otel_trace on;
Nginx Reference