Traefik
Monitor Traefik ingress controller performance, request routing, and traffic patterns with OpenTelemetry metrics and distributed tracing.
Overview
Traefik is a modern open-source application proxy that acts as an edge router, ingress controller, and API gateway for microservices and cloud-native architectures. It automatically discovers services from your infrastructure and dynamically configures routing without manual intervention.
The Dash0 integration provides complete observability for Traefik deployments using OpenTelemetry-native instrumentation for metrics and distributed tracing, plus structured JSON access logs.
For more information, visit the Traefik Observability Documentation .
Use Cases
Gain comprehensive visibility into your Traefik setup and optimize performance with the following observability features:
- Monitor Request Flows with Tracing: Visualize the full lifecycle of requests across services. Powered by OpenTelemetry, Traefik’s distributed tracing provides insight into latency, headers, and spans—ideal for debugging and performance tuning.
- Track System and Traffic Metrics: Collect real-time performance data such as request counts, durations, retries, open connections, and TLS usage.
- Audit and Analyze Traffic with Access Logs: Record detailed information about incoming requests, including IPs, headers, duration, response status, and more. Export structured JSON logs via OTLP for centralized analysis in Dash0.
- Customize Observability by EntryPoint or Router: Traefik allows fine-grained control over observability settings, letting you enable or disable logs, metrics, or tracing at a per-entrypoint or per-router level for optimized insights.
Use this integration to streamline monitoring of your edge traffic, debug routing issues, and ensure your platform services are operating efficiently.
Setup
Overview
Traefik includes built-in support for observability via OpenTelemetry metrics, distributed tracing, and structured access logs. This integration uses the recommended pattern of deploying an OpenTelemetry Collector in your cluster to collect telemetry from Traefik and forward it to Dash0.
For more details, refer to the Traefik Observability Documentation .
Configure
Prerequisites
You'll need an OpenTelemetry Collector deployed in your cluster to collect telemetry from Traefik and forward it to Dash0.
For production environments, consider using one of these deployment methods:
- Dash0 operator for Kubernetes (recommended)
- OpenTelemetry Operator for Kubernetes
-
Helm Chart for The OpenTelemetry Collector
For a complete working example with collector configuration, see the Dash0 Traefik Example .
Collecting Telemetry
Step 1: Create a values.yaml File
Configure Traefik to export metrics and traces to an OpenTelemetry Collector in your cluster by storing the following configuration in a values.yaml file:
# Enable structured JSON access logs
logs:
access:
enabled: true
format: json
# Configure OTLP metrics export to OpenTelemetry Collector
metrics:
otlp:
enabled: true
http:
enabled: true
endpoint: http://<collector endpoint>:4318/v1/metrics
pushInterval: 10s
# Disable Prometheus metrics when using OTLP
prometheus: null
# Configure OTLP tracing export to OpenTelemetry Collector
tracing:
otlp:
enabled: true
http:
enabled: true
endpoint: http://<collector endpoint>:4318/v1/tracesNote:
- The collector handles authentication and forwards telemetry to Dash0
- Setting
prometheus: nulldisables Prometheus metrics to avoid duplicate metric collection - Configure the collector endpoint to match your Collectors endpoint.
This configuration enables:
- Metrics: Request rates, latencies, and connection metrics pushed every 10 seconds to the OpenTelemetry Collector
- Tracing: Distributed traces for all requests sent to the OpenTelemetry Collector
- Access Logs: Structured JSON logs written to stdout, collected by the OpenTelemetry Collector's filelog receiver
Step 2: Deploy Traefik with Helm
Create a dedicated namespace for Traefik (optional but recommended), then install it using Helm:
kubectl create namespace traefik
helm upgrade --install traefik traefik/traefik \
--namespace traefik \
-f values.yamlThis installs Traefik with the specified configuration to export observability data to Dash0.
What Gets Collected
Once deployed, Traefik will send telemetry to the OpenTelemetry Collector, which then forwards to Dash0:
- Metrics: Request rates, response durations, and active connections
- Traces: HTTP request lifecycles through the proxy with full span details
- Access Logs: JSON-formatted logs for all requests and responses
The OpenTelemetry Collector acts as a central aggregation point, handling authentication with Dash0 and providing additional processing capabilities like sampling, filtering, and enrichment.
For more details, refer to the Traefik Metrics , Tracing , and Access Logs documentation.
For a complete working example with Traefik, OpenTelemetry Collector, and demo applications, see the Dash0 Traefik Example .
