2022-04-15 13:44:08 +00:00
|
|
|
---
|
|
|
|
title: "Traefik Datadog Tracing Documentation"
|
|
|
|
description: "Traefik Proxy supports Datadog for tracing. Read the technical documentation to enable Datadog for observability."
|
|
|
|
---
|
|
|
|
|
2019-09-02 10:18:04 +00:00
|
|
|
# Datadog
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
To enable the Datadog tracer:
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2019-07-16 07:54:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
2019-09-02 10:18:04 +00:00
|
|
|
datadog: {}
|
2019-07-16 07:54:04 +00:00
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
|
|
|
```
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
```bash tab="CLI"
|
2019-07-22 07:58:04 +00:00
|
|
|
--tracing.datadog=true
|
2019-06-27 22:16:04 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### `localAgentHostPort`
|
|
|
|
|
2023-03-20 16:16:08 +00:00
|
|
|
_Optional, Default="localhost:8126"_
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
Local Agent Host Port instructs the reporter to send spans to the Datadog Agent at this address (host:port).
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2019-07-16 07:54:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
2019-09-02 10:18:04 +00:00
|
|
|
datadog:
|
2023-03-20 16:16:08 +00:00
|
|
|
localAgentHostPort: localhost:8126
|
2019-07-16 07:54:04 +00:00
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
2023-03-20 16:16:08 +00:00
|
|
|
localAgentHostPort = "localhost:8126"
|
2021-06-18 22:08:08 +00:00
|
|
|
```
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
```bash tab="CLI"
|
2023-03-20 16:16:08 +00:00
|
|
|
--tracing.datadog.localAgentHostPort=localhost:8126
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `localAgentSocket`
|
|
|
|
|
|
|
|
_Optional, Default=""_
|
|
|
|
|
|
|
|
Local Agent Socket instructs the reporter to send spans to the Datadog Agent at this UNIX socket.
|
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
|
|
|
datadog:
|
|
|
|
localAgentSocket: /var/run/datadog/apm.socket
|
|
|
|
```
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
|
|
|
localAgentSocket = "/var/run/datadog/apm.socket"
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.datadog.localAgentSocket=/var/run/datadog/apm.socket
|
2019-06-27 22:16:04 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### `debug`
|
|
|
|
|
|
|
|
_Optional, Default=false_
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
Enables Datadog debug.
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2019-07-16 07:54:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
2019-09-02 10:18:04 +00:00
|
|
|
datadog:
|
2019-07-16 07:54:04 +00:00
|
|
|
debug: true
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
|
|
|
debug = true
|
|
|
|
```
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.datadog.debug=true
|
|
|
|
```
|
|
|
|
|
2022-09-12 13:14:08 +00:00
|
|
|
#### `globalTags`
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
_Optional, Default=empty_
|
|
|
|
|
2022-09-12 13:14:08 +00:00
|
|
|
Applies a list of shared key:value tags on all spans.
|
2019-06-27 22:16:04 +00:00
|
|
|
|
2019-07-16 07:54:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
2019-09-02 10:18:04 +00:00
|
|
|
datadog:
|
2022-09-12 13:14:08 +00:00
|
|
|
globalTags:
|
|
|
|
tag1: foo
|
|
|
|
tag2: bar
|
2019-07-16 07:54:04 +00:00
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
2022-09-12 13:14:08 +00:00
|
|
|
[tracing.datadog.globalTags]
|
|
|
|
tag1 = "foo"
|
|
|
|
tag2 = "bar"
|
2021-06-18 22:08:08 +00:00
|
|
|
```
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
```bash tab="CLI"
|
2022-09-12 13:14:08 +00:00
|
|
|
--tracing.datadog.globalTags.tag1=foo
|
|
|
|
--tracing.datadog.globalTags.tag2=bar
|
2019-06-27 22:16:04 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### `prioritySampling`
|
|
|
|
|
|
|
|
_Optional, Default=false_
|
|
|
|
|
2021-09-29 08:40:14 +00:00
|
|
|
Enables priority sampling.
|
|
|
|
When using distributed tracing,
|
2019-06-27 22:16:04 +00:00
|
|
|
this option must be enabled in order to get all the parts of a distributed trace sampled.
|
|
|
|
|
2019-07-16 07:54:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
tracing:
|
2019-09-02 10:18:04 +00:00
|
|
|
datadog:
|
2019-07-16 07:54:04 +00:00
|
|
|
prioritySampling: true
|
|
|
|
```
|
|
|
|
|
2021-06-18 22:08:08 +00:00
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[tracing]
|
|
|
|
[tracing.datadog]
|
|
|
|
prioritySampling = true
|
|
|
|
```
|
|
|
|
|
2019-06-27 22:16:04 +00:00
|
|
|
```bash tab="CLI"
|
|
|
|
--tracing.datadog.prioritySampling=true
|
|
|
|
```
|