Skip to content

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.

Please check our dedicated OTel docs to learn more.

Configuration¶

To enable the tracing:

tracing: {}
[tracing]
--tracing=true

Common Options¶

addInternals¶

Optional, Default="false"

Enables tracing for internal resources (e.g.: ping@internal).

tracing:
  addInternals: true
[tracing]
  addInternals = true
--tracing.addinternals

serviceName¶

Required, Default="traefik"

Service name used in selected backend.

tracing:
  serviceName: traefik
[tracing]
  serviceName = "traefik"
--tracing.serviceName=traefik

sampleRate¶

Optional, Default=1.0

The proportion of requests to trace, specified between 0.0 and 1.0.

tracing:
  sampleRate: 0.2
[tracing]
  sampleRate = 0.2
--tracing.sampleRate=0.2

resourceAttributes¶

Optional, Default=empty

Defines additional resource attributes to be sent to the collector.

tracing:
  resourceAttributes:
    attr1: foo
    attr2: bar
[tracing]
  [tracing.resourceAttributes]
    attr1 = "foo"
    attr2 = "bar"
--tracing.resourceAttributes.attr1=foo
--tracing.resourceAttributes.attr2=bar

capturedRequestHeaders¶

Optional, Default=empty

Defines the list of request headers to add as attributes. It applies to client and server kind spans.

tracing:
  capturedRequestHeaders:
    - X-CustomHeader
    - X-OtherHeader
[tracing]
  capturedRequestHeaders = ["X-CustomHeader", "X-OtherHeader"]
--tracing.capturedRequestHeaders="X-CustomHeader,X-OtherHeader"

capturedResponseHeaders¶

Optional, Default=empty

Defines the list of response headers to add as attributes. It applies to client and server kind spans.

tracing:
  capturedResponseHeaders:
    - X-CustomHeader
    - X-OtherHeader
[tracing]
  capturedResponseHeaders = ["X-CustomHeader", "X-OtherHeader"]
--tracing.capturedResponseHeaders="X-CustomHeader,X-OtherHeader"

safeQueryParams¶

Optional, Default=[]

By default, all query parameters are redacted. Defines the list of query parameters to not redact.

tracing:
  safeQueryParams:
    - bar
    - buz
[tracing]
  safeQueryParams = ["bar", "buz"]
--tracing.safeQueryParams=bar,buz