Overview¶
Traefik’s observability features include logs, access logs, metrics, and tracing. You can configure these options globally or at more specific levels, such as per router or per entry point.
Configuration Example¶
Enable access logs, metrics, and tracing globally
accessLog: {}
metrics:
otlp: {}
tracing: {}
[accessLog]
[metrics]
[metrics.otlp]
[tracing]
--accesslog=true
--metrics.otlp=true
--tracing=true
You can disable access logs, metrics, and tracing for a specific entrypoint attached to a router:
# Static Configuration
entryPoints:
EntryPoint0:
address: ':8000/udp'
observability:
accessLogs: false
tracing: false
metrics: false
# Static Configuration
[entryPoints.EntryPoint0]
address = ":8000/udp"
[entryPoints.EntryPoint0.observability]
accessLogs = false
tracing = false
metrics = false
# Static Configuration
--entryPoints.EntryPoint0.address=:8000/udp
--entryPoints.EntryPoint0.observability.accessLogs=false
--entryPoints.EntryPoint0.observability.metrics=false
--entryPoints.EntryPoint0.observability.tracing=false
Default Behavior
A router with its own observability configuration will override the global default.
Configuration Options¶
Logs¶
Traefik logs informs about everything that happens within Traefik (startup, configuration, events, shutdown, and so on).
Read the Logs documentation to learn how to configure it.
Access Logs¶
Access logs are a key part of observability in Traefik.
They are providing valuable insights about incoming traffic, and allow to monitor it. The access logs record detailed information about each request received by Traefik, including the source IP address, requested URL, response status code, and more.
Read the Access Logs documentation to learn how to configure it.
Metrics¶
Traefik offers a metrics feature that provides valuable insights about the performance and usage. These metrics include the number of requests received, the requests duration, and more.
On top of supporting metrics in the OpenTelemetry format, Traefik supports the following vendor specific metrics systems: Prometheus, Datadog, InfluxDB 2.X, and StatsD.
Read the Metrics documentation to learn how to configure it.
Tracing¶
The Traefik tracing system allows developers to gain deep visibility into the flow of requests through their infrastructure.
Traefik provides tracing information in the OpenTelemery format.
Read the Tracing documentation to learn how to configure it.