Tracing

Visualize the Requests Flow

The tracing system allows developers to visualize call flows in their infrastructure.

Traefik uses OpenTelemetry, an open standard designed for distributed tracing.

Configuration Example

To enable the tracing:

File (YAML)

  1. tracing: {}

File (TOML)

  1. [tracing]

CLI

  1. --tracing=true

Helm Chart Values

  1. tracing:
  2. otlp:
  3. enabled: true

Configuration Options

FieldDescriptionDefaultRequired
tracing.addInternalsEnables tracing for internal resources (e.g.: ping@internal).falseNo
tracing.serviceNameService name used in selected backend.“traefik”No
tracing.sampleRateThe proportion of requests to trace, specified between 0.0 and 1.0.1.0No
tracing.globalAttributesApplies a list of shared key:value attributes on all spans.{}No
tracing.capturedRequestHeadersDefines the list of request headers to add as attributes.
It applies to client and server kind spans.
{}No
tracing.capturedResponseHeadersDefines the list of response headers to add as attributes.
It applies to client and server kind spans.
{}False
tracing.safeQueryParamsBy default, all query parameters are redacted.
Defines the list of query parameters to not redact.
{}No
tracing.otlp.httpThis instructs the exporter to send the tracing to the OpenTelemetry Collector using HTTP.
Setting the sub-options with their default values.
null/falseNo
tracing.otlp.http.endpointURL of the OpenTelemetry Collector to send tracing to.
Format=”<scheme>://<host>:<port><path>
http://localhost:4318/v1/tracingYes
tracing.otlp.http.headersAdditional headers sent with tracing by the exporter to the OpenTelemetry Collector.No
tracing.otlp.http.tls.caPath to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle.“”No
tracing.otlp.http.tls.certPath to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key option is required.“”No
tracing.otlp.http.tls.keyThis instructs the exporter to send the tracing to the OpenTelemetry Collector using HTTP.
Setting the sub-options with their default values.
“”null/false “”No
tracing.otlp.http.tls.insecureskipverifyIf insecureSkipVerify is true, the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers.falseYes
tracing.otlp.grpcThis instructs the exporter to send tracing to the OpenTelemetry Collector using gRPC.falseNo
tracing.otlp.grpc.endpointAddress of the OpenTelemetry Collector to send tracing to.
Format=”<host>:<port>
“localhost:4317”Yes
tracing.otlp.grpc.headersAdditional headers sent with tracing by the exporter to the OpenTelemetry Collector.{}No
tracing.otlp.grpc.insecureAllows exporter to send tracing to the OpenTelemetry Collector without using a secured protocol.falseYes
tracing.otlp.grpc.tls.caPath to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle.“”No
tracing.otlp.grpc.tls.certPath to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key option is required.“”No
tracing.otlp.grpc.tls.keyThis instructs the exporter to send the tracing to the OpenTelemetry Collector using HTTP.
Setting the sub-options with their default values.
“”null/false “”No
tracing.otlp.grpc.tls.insecureskipverifyIf insecureSkipVerify is true, the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers.falseYes