Improve tracing documentation

This commit is contained in:
Michael 2019-07-16 09:54:04 +02:00 committed by Traefiker Bot
parent a17ac23457
commit 889b38f75a
6 changed files with 255 additions and 38 deletions

View file

@ -2,11 +2,16 @@
To enable the DataDog: To enable the DataDog:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.dataDog] [tracing.dataDog]
``` ```
```yaml tab="File (YAML)"
tracing:
dataDog: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.datadog --tracing.datadog
@ -18,12 +23,18 @@ _Required, Default="127.0.0.1:8126"_
Local Agent Host Port instructs reporter to send spans to datadog-tracing-agent at this address. Local Agent Host Port instructs reporter to send spans to datadog-tracing-agent at this address.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.dataDog] [tracing.dataDog]
localAgentHostPort = "127.0.0.1:8126" localAgentHostPort = "127.0.0.1:8126"
``` ```
```yaml tab="File (YAML)"
tracing:
dataDog:
localAgentHostPort: 127.0.0.1:8126
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.datadog.localAgentHostPort="127.0.0.1:8126" --tracing.datadog.localAgentHostPort="127.0.0.1:8126"
@ -35,12 +46,18 @@ _Optional, Default=false_
Enable DataDog debug. Enable DataDog debug.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.dataDog] [tracing.dataDog]
debug = true debug = true
``` ```
```yaml tab="File (YAML)"
tracing:
dataDog:
debug: true
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.datadog.debug=true --tracing.datadog.debug=true
@ -52,12 +69,18 @@ _Optional, Default=empty_
Apply shared tag in a form of Key:Value to all the traces. Apply shared tag in a form of Key:Value to all the traces.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.dataDog] [tracing.dataDog]
globalTag = "sample" globalTag = "sample"
``` ```
```yaml tab="File (YAML)"
tracing:
dataDog:
globalTag: sample
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.datadog.globalTag="sample" --tracing.datadog.globalTag="sample"
@ -70,12 +93,18 @@ _Optional, Default=false_
Enable priority sampling. When using distributed tracing, Enable priority sampling. When using distributed tracing,
this option must be enabled in order to get all the parts of a distributed trace sampled. this option must be enabled in order to get all the parts of a distributed trace sampled.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.dataDog] [tracing.dataDog]
prioritySampling = true prioritySampling = true
``` ```
```yaml tab="File (YAML)"
tracing:
dataDog:
prioritySampling: true
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.datadog.prioritySampling=true --tracing.datadog.prioritySampling=true

View file

@ -2,11 +2,16 @@
To enable the Haystack: To enable the Haystack:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
``` ```
```yaml tab="File (YAML)"
tracing:
haystack: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack --tracing.haystack
@ -18,12 +23,18 @@ _Require, Default="127.0.0.1"_
Local Agent Host instructs reporter to send spans to haystack-agent at this address. Local Agent Host instructs reporter to send spans to haystack-agent at this address.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
localAgentHost = "127.0.0.1" localAgentHost = "127.0.0.1"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
localAgentHost: 127.0.0.1
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.localAgentHost="127.0.0.1" --tracing.haystack.localAgentHost="127.0.0.1"
@ -35,12 +46,18 @@ _Require, Default=42699_
Local Agent port instructs reporter to send spans to the haystack-agent at this port. Local Agent port instructs reporter to send spans to the haystack-agent at this port.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
localAgentPort = 42699 localAgentPort = 42699
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
localAgentPort: 42699
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.localAgentPort=42699 --tracing.haystack.localAgentPort=42699
@ -52,12 +69,18 @@ _Optional, Default=empty_
Apply shared tag in a form of Key:Value to all the traces. Apply shared tag in a form of Key:Value to all the traces.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
globalTag = "sample:test" globalTag = "sample:test"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
globalTag: sample:test
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.globalTag="sample:test" --tracing.haystack.globalTag="sample:test"
@ -69,12 +92,18 @@ _Optional, Default=empty_
Specifies the header name that will be used to store the trace ID. Specifies the header name that will be used to store the trace ID.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
traceIDHeaderName = "sample" traceIDHeaderName = "sample"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
traceIDHeaderName: sample
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.traceIDHeaderName="sample" --tracing.haystack.traceIDHeaderName="sample"
@ -86,12 +115,18 @@ _Optional, Default=empty_
Specifies the header name that will be used to store the span ID. Specifies the header name that will be used to store the span ID.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
parentIDHeaderName = "sample" parentIDHeaderName = "sample"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
parentIDHeaderName: "sample"
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.parentIDHeaderName="sample" --tracing.haystack.parentIDHeaderName="sample"
@ -103,15 +138,21 @@ _Optional, Default=empty_
Apply shared tag in a form of Key:Value to all the traces. Apply shared tag in a form of Key:Value to all the traces.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
spanIDHeaderName = "sample:test" spanIDHeaderName = "sample:test"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
spanIDHeaderName: "sample:test"
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.spanIDHeaderName="sample:test" --tracing.haystack.spanIDHeaderName=sample:test
``` ```
#### `baggagePrefixHeaderName` #### `baggagePrefixHeaderName`
@ -120,12 +161,19 @@ _Optional, Default=empty_
Specifies the header name prefix that will be used to store baggage items in a map. Specifies the header name prefix that will be used to store baggage items in a map.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.haystack] [tracing.haystack]
baggagePrefixHeaderName = "sample" baggagePrefixHeaderName = "sample"
``` ```
```yaml tab="File (YAML)"
tracing:
haystack:
baggagePrefixHeaderName: "sample"
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.haystack.baggagePrefixHeaderName="sample" --tracing.haystack.baggagePrefixHeaderName="sample"

View file

@ -2,11 +2,16 @@
To enable the Instana: To enable the Instana:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.instana] [tracing.instana]
``` ```
```yaml tab="File (YAML)"
tracing:
instana: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.instana --tracing.instana
@ -18,12 +23,18 @@ _Require, Default="127.0.0.1"_
Local Agent Host instructs reporter to send spans to instana-agent at this address. Local Agent Host instructs reporter to send spans to instana-agent at this address.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.instana] [tracing.instana]
localAgentHost = "127.0.0.1" localAgentHost = "127.0.0.1"
``` ```
```yaml tab="File (YAML)"
tracing:
instana:
localAgentHost: 127.0.0.1
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.instana.localAgentHost="127.0.0.1" --tracing.instana.localAgentHost="127.0.0.1"
@ -35,12 +46,18 @@ _Require, Default=42699_
Local Agent port instructs reporter to send spans to the instana-agent at this port. Local Agent port instructs reporter to send spans to the instana-agent at this port.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.instana] [tracing.instana]
localAgentPort = 42699 localAgentPort = 42699
``` ```
```yaml tab="File (YAML)"
tracing:
instana:
localAgentPort: 42699
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.instana.localAgentPort=42699 --tracing.instana.localAgentPort=42699
@ -59,12 +76,18 @@ Valid values for logLevel field are:
- `debug` - `debug`
- `info` - `info`
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.instana] [tracing.instana]
logLevel = "info" logLevel = "info"
``` ```
```yaml tab="File (YAML)"
tracing:
instana:
logLevel: info
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.instana.logLevel="info" --tracing.instana.logLevel="info"

View file

@ -2,11 +2,16 @@
To enable the Jaeger: To enable the Jaeger:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger --tracing.jaeger
@ -22,12 +27,18 @@ _Required, Default="http://localhost:5778/sampling"_
Sampling Server URL is the address of jaeger-agent's HTTP sampling server. Sampling Server URL is the address of jaeger-agent's HTTP sampling server.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
samplingServerURL = "http://localhost:5778/sampling" samplingServerURL = "http://localhost:5778/sampling"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
samplingServerURL: http://localhost:5778/sampling
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.samplingServerURL="http://localhost:5778/sampling" --tracing.jaeger.samplingServerURL="http://localhost:5778/sampling"
@ -39,12 +50,18 @@ _Required, Default="const"_
Sampling Type specifies the type of the sampler: `const`, `probabilistic`, `rateLimiting`. Sampling Type specifies the type of the sampler: `const`, `probabilistic`, `rateLimiting`.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
samplingType = "const" samplingType = "const"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
samplingType: const
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.samplingType="const" --tracing.jaeger.samplingType="const"
@ -62,12 +79,18 @@ Valid values for Param field are:
- for `probabilistic` sampler, a probability between 0 and 1 - for `probabilistic` sampler, a probability between 0 and 1
- for `rateLimiting` sampler, the number of spans per second - for `rateLimiting` sampler, the number of spans per second
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
samplingParam = 1.0 samplingParam = 1.0
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
samplingParam: 1.0
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.samplingParam="1.0" --tracing.jaeger.samplingParam="1.0"
@ -79,12 +102,18 @@ _Required, Default="127.0.0.1:6831"_
Local Agent Host Port instructs reporter to send spans to jaeger-agent at this address. Local Agent Host Port instructs reporter to send spans to jaeger-agent at this address.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
localAgentHostPort = "127.0.0.1:6831" localAgentHostPort = "127.0.0.1:6831"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
localAgentHostPort: 127.0.0.1:6831
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.localAgentHostPort="127.0.0.1:6831" --tracing.jaeger.localAgentHostPort="127.0.0.1:6831"
@ -96,12 +125,18 @@ _Optional, Default=false_
Generate 128-bit trace IDs, compatible with OpenCensus. Generate 128-bit trace IDs, compatible with OpenCensus.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
gen128Bit = true gen128Bit = true
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
gen128Bit: true
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.gen128Bit --tracing.jaeger.gen128Bit
@ -117,12 +152,18 @@ This can be either:
- `jaeger`, jaeger's default trace header. - `jaeger`, jaeger's default trace header.
- `b3`, compatible with OpenZipkin - `b3`, compatible with OpenZipkin
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
propagation = "jaeger" propagation = "jaeger"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
propagation: jaeger
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.propagation="jaeger" --tracing.jaeger.propagation="jaeger"
@ -135,12 +176,18 @@ _Required, Default="uber-trace-id"_
Trace Context Header Name is the http header name used to propagate tracing context. Trace Context Header Name is the http header name used to propagate tracing context.
This must be in lower-case to avoid mismatches when decoding incoming headers. This must be in lower-case to avoid mismatches when decoding incoming headers.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger] [tracing.jaeger]
traceContextHeaderName = "uber-trace-id" traceContextHeaderName = "uber-trace-id"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
traceContextHeaderName: uber-trace-id
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.traceContextHeaderName="uber-trace-id" --tracing.jaeger.traceContextHeaderName="uber-trace-id"
@ -153,12 +200,19 @@ _Optional, Default=""_
Collector Endpoint instructs reporter to send spans to jaeger-collector at this URL. Collector Endpoint instructs reporter to send spans to jaeger-collector at this URL.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger.collector] [tracing.jaeger.collector]
endpoint = "http://127.0.0.1:14268/api/traces?format=jaeger.thrift" endpoint = "http://127.0.0.1:14268/api/traces?format=jaeger.thrift"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
collector:
endpoint: http://127.0.0.1:14268/api/traces?format=jaeger.thrift
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.collector.endpoint="http://127.0.0.1:14268/api/traces?format=jaeger.thrift" --tracing.jaeger.collector.endpoint="http://127.0.0.1:14268/api/traces?format=jaeger.thrift"
@ -170,12 +224,19 @@ _Optional, Default=""_
User instructs reporter to include a user for basic http authentication when sending spans to jaeger-collector. User instructs reporter to include a user for basic http authentication when sending spans to jaeger-collector.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger.collector] [tracing.jaeger.collector]
user = "my-user" user = "my-user"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
collector:
user: my-user
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.collector.user="my-user" --tracing.jaeger.collector.user="my-user"
@ -187,12 +248,19 @@ _Optional, Default=""_
Password instructs reporter to include a password for basic http authentication when sending spans to jaeger-collector. Password instructs reporter to include a password for basic http authentication when sending spans to jaeger-collector.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.jaeger.collector] [tracing.jaeger.collector]
password = "my-password" password = "my-password"
``` ```
```yaml tab="File (YAML)"
tracing:
jaeger:
collector:
password: my-password
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.jaeger.collector.password="my-password" --tracing.jaeger.collector.password="my-password"

View file

@ -21,10 +21,14 @@ By default, Traefik uses Jaeger as tracing backend.
To enable the tracing: To enable the tracing:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
``` ```
```yaml tab="File (YAML)"
tracing: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
``` ```
@ -37,11 +41,16 @@ _Required, Default="traefik"_
Service name used in selected backend. Service name used in selected backend.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
serviceName = "traefik" serviceName = "traefik"
``` ```
```yaml tab="File (YAML)"
tracing:
serviceName: traefik
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.serviceName="traefik" --tracing.serviceName="traefik"
@ -56,11 +65,16 @@ This can prevent certain tracing providers to drop traces that exceed their leng
`0` means no truncation will occur. `0` means no truncation will occur.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
spanNameLimit = 150 spanNameLimit = 150
``` ```
```yaml tab="File (YAML)"
tracing:
spanNameLimit: 150
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.spanNameLimit=150 --tracing.spanNameLimit=150

View file

@ -2,11 +2,16 @@
To enable the Zipkin: To enable the Zipkin:
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin: {}
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin --tracing.zipkin
@ -18,12 +23,18 @@ _Required, Default="http://localhost:9411/api/v1/spans"_
Zipkin HTTP endpoint used to send data. Zipkin HTTP endpoint used to send data.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
httpEndpoint = "http://localhost:9411/api/v1/spans" httpEndpoint = "http://localhost:9411/api/v1/spans"
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin:
httpEndpoint: http://localhost:9411/api/v1/spans
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin.httpEndpoint="http://localhost:9411/api/v1/spans" --tracing.zipkin.httpEndpoint="http://localhost:9411/api/v1/spans"
@ -35,12 +46,18 @@ _Optional, Default=false_
Enable Zipkin debug. Enable Zipkin debug.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
debug = true debug = true
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin:
debug: true
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin.debug=true --tracing.zipkin.debug=true
@ -52,12 +69,18 @@ _Optional, Default=false_
Use Zipkin SameSpan RPC style traces. Use Zipkin SameSpan RPC style traces.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
sameSpan = true sameSpan = true
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin:
sameSpan: true
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin.sameSpan=true --tracing.zipkin.sameSpan=true
@ -69,12 +92,18 @@ _Optional, Default=true_
Use Zipkin 128 bit root span IDs. Use Zipkin 128 bit root span IDs.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
id128Bit = false id128Bit = false
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin:
id128Bit: false
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin.id128Bit=false --tracing.zipkin.id128Bit=false
@ -86,12 +115,18 @@ _Required, Default=1.0_
The rate between 0.0 and 1.0 of requests to trace. The rate between 0.0 and 1.0 of requests to trace.
```toml tab="File" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.zipkin] [tracing.zipkin]
sampleRate = 0.2 sampleRate = 0.2
``` ```
```yaml tab="File (YAML)"
tracing:
zipkin:
sampleRate: 0.2
```
```bash tab="CLI" ```bash tab="CLI"
--tracing --tracing
--tracing.zipkin.sampleRate="0.2" --tracing.zipkin.sampleRate="0.2"