traefik/docs/content/observability/tracing/overview.md

2.7 KiB

title description
Traefik Tracing Overview The Traefik Proxy tracing system allows developers to visualize call flows in their infrastructure. Read the full documentation.

Tracing

Visualize the Requests Flow {: .subtitle }

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

globalAttributes

Optional, Default=empty

Applies a list of shared key:value attributes on all spans.

tracing:
  globalAttributes:
    attr1: foo
    attr2: bar
[tracing]
    [tracing.globalAttributes]
      attr1 = "foo"
      attr2 = "bar"
--tracing.globalAttributes.attr1=foo
--tracing.globalAttributes.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
[tracing]
    capturedRequestHeaders = ["X-CustomHeader"]
--tracing.capturedRequestHeaders[0]=X-CustomHeader

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
[tracing]
    capturedResponseHeaders = ["X-CustomHeader"]
--tracing.capturedResponseHeaders[0]=X-CustomHeader