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
DOGSTATSD_HOST_IP The IP of the agent - yes
DOGSTATSD_HOST_PORT The port of the agent 8125 no
## 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
DOGSTATSD_HOST_IP The IP of the agent - yes
DOGSTATSD_HOST_PORT The port of the agent 8126 no
#[...]
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]