2018-01-10 16:48:04 +00:00
|
|
|
# Tracing
|
|
|
|
|
2018-08-06 12:58:03 +00:00
|
|
|
The tracing system allows developers to visualize call flows in their infrastructure.
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
We use [OpenTracing](http://opentracing.io). It is an open standard designed for distributed tracing.
|
|
|
|
|
2018-10-17 14:24:04 +00:00
|
|
|
Traefik supports three tracing backends: Jaeger, Zipkin and DataDog.
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
## Jaeger
|
|
|
|
|
|
|
|
```toml
|
|
|
|
# Tracing definition
|
|
|
|
[tracing]
|
|
|
|
# Backend name used to send tracing data
|
|
|
|
#
|
|
|
|
# Default: "jaeger"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
backend = "jaeger"
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
# Service name used in Jaeger backend
|
|
|
|
#
|
|
|
|
# Default: "traefik"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
serviceName = "traefik"
|
2018-07-31 22:16:03 +00:00
|
|
|
|
|
|
|
# Span name limit allows for name truncation in case of very long Frontend/Backend names
|
|
|
|
# This can prevent certain tracing providers to drop traces that exceed their length limits
|
|
|
|
#
|
|
|
|
# Default: 0 - no truncation will occur
|
|
|
|
#
|
|
|
|
spanNameLimit = 0
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
[tracing.jaeger]
|
2018-04-06 07:38:03 +00:00
|
|
|
# Sampling Server URL is the address of jaeger-agent's HTTP sampling server
|
2018-01-10 16:48:04 +00:00
|
|
|
#
|
|
|
|
# Default: "http://localhost:5778/sampling"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
samplingServerURL = "http://localhost:5778/sampling"
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
# Sampling Type specifies the type of the sampler: const, probabilistic, rateLimiting
|
|
|
|
#
|
|
|
|
# Default: "const"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
samplingType = "const"
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2018-04-06 07:38:03 +00:00
|
|
|
# Sampling Param is a value passed to the sampler.
|
2018-01-10 16:48:04 +00:00
|
|
|
# Valid values for Param field are:
|
|
|
|
# - for "const" sampler, 0 or 1 for always false/true respectively
|
|
|
|
# - for "probabilistic" sampler, a probability between 0 and 1
|
|
|
|
# - for "rateLimiting" sampler, the number of spans per second
|
|
|
|
#
|
|
|
|
# Default: 1.0
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
samplingParam = 1.0
|
2018-01-18 16:24:03 +00:00
|
|
|
|
2018-04-06 07:38:03 +00:00
|
|
|
# Local Agent Host Port instructs reporter to send spans to jaeger-agent at this address
|
2018-01-18 16:24:03 +00:00
|
|
|
#
|
2018-04-24 17:22:03 +00:00
|
|
|
# Default: "127.0.0.1:6831"
|
2018-01-18 16:24:03 +00:00
|
|
|
#
|
2018-04-24 17:22:03 +00:00
|
|
|
localAgentHostPort = "127.0.0.1:6831"
|
2018-08-01 11:52:03 +00:00
|
|
|
|
|
|
|
# Generate 128-bit trace IDs, compatible with OpenCensus
|
|
|
|
#
|
|
|
|
# Default: false
|
|
|
|
gen128Bit = true
|
|
|
|
|
|
|
|
# Set the propagation header type. This can be either:
|
|
|
|
# - "jaeger", jaeger's default trace header.
|
|
|
|
# - "b3", compatible with OpenZipkin
|
|
|
|
#
|
|
|
|
# Default: "jaeger"
|
|
|
|
propagation = "jaeger"
|
2018-01-10 16:48:04 +00:00
|
|
|
```
|
|
|
|
|
2018-04-24 17:22:03 +00:00
|
|
|
!!! warning
|
2018-10-17 14:24:04 +00:00
|
|
|
Traefik is only able to send data over compact thrift protocol to the [Jaeger agent](https://www.jaegertracing.io/docs/deployment/#agent).
|
2018-04-24 17:22:03 +00:00
|
|
|
|
2018-01-10 16:48:04 +00:00
|
|
|
## Zipkin
|
|
|
|
|
|
|
|
```toml
|
|
|
|
# Tracing definition
|
|
|
|
[tracing]
|
|
|
|
# Backend name used to send tracing data
|
|
|
|
#
|
|
|
|
# Default: "jaeger"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
backend = "zipkin"
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
# Service name used in Zipkin backend
|
|
|
|
#
|
|
|
|
# Default: "traefik"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
serviceName = "traefik"
|
2018-07-31 22:16:03 +00:00
|
|
|
|
|
|
|
# Span name limit allows for name truncation in case of very long Frontend/Backend names
|
|
|
|
# This can prevent certain tracing providers to drop traces that exceed their length limits
|
|
|
|
#
|
|
|
|
# Default: 0 - no truncation will occur
|
|
|
|
#
|
|
|
|
spanNameLimit = 150
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
[tracing.zipkin]
|
2018-10-09 08:18:02 +00:00
|
|
|
# Zipkin HTTP endpoint used to send data
|
2018-01-10 16:48:04 +00:00
|
|
|
#
|
|
|
|
# Default: "http://localhost:9411/api/v1/spans"
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
httpEndpoint = "http://localhost:9411/api/v1/spans"
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
# Enable Zipkin debug
|
|
|
|
#
|
|
|
|
# Default: false
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
debug = false
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2018-10-09 08:18:02 +00:00
|
|
|
# Use Zipkin SameSpan RPC style traces
|
2018-01-10 16:48:04 +00:00
|
|
|
#
|
|
|
|
# Default: false
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
sameSpan = false
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2018-10-09 08:18:02 +00:00
|
|
|
# Use Zipkin 128 bit root span IDs
|
2018-01-10 16:48:04 +00:00
|
|
|
#
|
|
|
|
# Default: true
|
|
|
|
#
|
2018-04-06 07:38:03 +00:00
|
|
|
id128Bit = true
|
2018-10-09 08:18:02 +00:00
|
|
|
|
|
|
|
# The rate between 0.0 and 1.0 of requests to trace.
|
|
|
|
#
|
|
|
|
# Default: 1.0
|
|
|
|
#
|
|
|
|
sampleRate = 0.2
|
2018-01-10 16:48:04 +00:00
|
|
|
```
|
2018-06-28 16:40:04 +00:00
|
|
|
|
|
|
|
## DataDog
|
|
|
|
|
|
|
|
```toml
|
|
|
|
# Tracing definition
|
|
|
|
[tracing]
|
|
|
|
# Backend name used to send tracing data
|
|
|
|
#
|
|
|
|
# Default: "jaeger"
|
|
|
|
#
|
|
|
|
backend = "datadog"
|
|
|
|
|
|
|
|
# Service name used in DataDog backend
|
|
|
|
#
|
|
|
|
# Default: "traefik"
|
|
|
|
#
|
|
|
|
serviceName = "traefik"
|
2018-07-31 22:16:03 +00:00
|
|
|
|
|
|
|
# Span name limit allows for name truncation in case of very long Frontend/Backend names
|
|
|
|
# This can prevent certain tracing providers to drop traces that exceed their length limits
|
|
|
|
#
|
|
|
|
# Default: 0 - no truncation will occur
|
|
|
|
#
|
|
|
|
spanNameLimit = 100
|
2018-06-28 16:40:04 +00:00
|
|
|
|
|
|
|
[tracing.datadog]
|
|
|
|
# Local Agent Host Port instructs reporter to send spans to datadog-tracing-agent at this address
|
|
|
|
#
|
|
|
|
# Default: "127.0.0.1:8126"
|
|
|
|
#
|
|
|
|
localAgentHostPort = "127.0.0.1:8126"
|
|
|
|
|
|
|
|
# Enable DataDog debug
|
|
|
|
#
|
|
|
|
# Default: false
|
|
|
|
#
|
|
|
|
debug = false
|
|
|
|
|
|
|
|
# Apply shared tag in a form of Key:Value to all the traces
|
|
|
|
#
|
|
|
|
# Default: ""
|
|
|
|
#
|
|
|
|
globalTag = ""
|
|
|
|
|
|
|
|
```
|