Skip to content

DataDog

This document describes the steps to follow to use DataDog with Traefik Enterprise.

Enable DataDog Metrics

If you want to use DataDog as a metric provider, you have to define the environment variables on your proxies to set the IP and port of the DataDog agent.

Name Description Default Required
DD_AGENT_HOST The host of the agent - no
DOGSTATSD_HOST_IP The IP of the agent - no
DD_DOGSTATSD_PORT The port of the agent 8125 no
DOGSTATSD_HOST_PORT The port of the agent 8125 no

Note

Either DD_AGENT_HOST or DOGSTATSD_HOST_IP must be set. The DataDog Operator can automatically inject the DD_AGENT_HOST.

## Deploy with "teectl apply --file=routing.yaml"

entrypoints:
  web:
    address: ":80"
  websecure
    address: ":443"

metrics:
  datadog:

providers:
  kubernetescrd:
## Deploy with "teectl apply --file=routing.toml"

[entryPoints]
  [entryPoints.web]
    address = ":80"
  [entryPoints.websecure]
    address = ":443"

[metrics.datadog]

[providers.kubernetescrd]

Enable DataDog Tracing

If you want to use DataDog as a tracing provider, you have to define the environment variables on your proxies to set the IP and port of the DataDog agent.

Name Description Default Required
DD_AGENT_HOST The host of the agent - no
DOGSTATSD_HOST_IP The IP of the agent - no
DD_TRACE_AGENT_PORT The port of the agent 8126 no
DOGSTATSD_HOST_PORT The port of the agent 8126 no

Note

Either DD_AGENT_HOST or DOGSTATSD_HOST_IP must be set. The DataDog Operator can automatically inject the DD_AGENT_HOST.

#[...]
env:
  - name: DOGSTATSD_HOST_IP
    valueFrom:
      fieldRef:
        fieldPath: status.hostIP
#[...]
environment:
  - DOGSTATSD_HOST_IP=10.3.2.1
DOGSTATSD_HOST_IP=10.3.2.1
Global Tag

To specify a DataDog environment for all data emitted, use the global tag option on the static configuration.

## Deploy with "teectl apply --file=routing.yaml"

entrypoints:
  web:
    address: ":80"
  websecure
    address: ":443"

tracing:
  datadog:
    #globalTag: "env:example"

providers:
  kubernetescrd:
## Deploy with "teectl apply --file=routing.toml"

[entryPoints]
  [entryPoints.web]
    address = ":80"
  [entryPoints.websecure]
    address = ":443"

[tracing.datadog]
#globalTag = "env:example"

[providers.kubernetescrd]