Skip to main content
Collect Traefik access logs — routing decisions, backend responses, and latency — with the OpenTelemetry Collector. The same Collector can also forward traces and metrics from your apps — see Connect OpenTelemetry Collector to Bronto.

Prerequisites

Enable a JSON access log in traefik.yaml:
traefik.yaml
accessLog:
  filePath: /var/log/traefik/access.log
  format: json

Configure the Collector

Traefik’s JSON access log is one object per line — parse it with json_parser:
/etc/otel/config.yaml
receivers:
  filelog/traefik:
    include:
      - /var/log/traefik/access.log
    operators:
      - type: json_parser
    resource:
      service.name: traefik
      service.namespace: <YOUR_COLLECTION_NAME>

processors:
  batch:

exporters:
  otlphttp/brontologs:
    logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>

service:
  pipelines:
    logs:
      receivers: [filelog/traefik]
      processors: [batch]
      exporters: [otlphttp/brontologs]
Set <REGION> to eu or us.

What you will see in Bronto

Open Search and filter by service.name = traefik. Each entry carries the client address (ClientHost), entrypoint, router and service names, method (RequestMethod), path (RequestPath), status (DownstreamStatus), duration (Duration), and backend URL. The JSON fields map directly to searchable attributes.

Troubleshooting

  • No log file? Traefik logs to stdout unless accessLog.filePath is set. Add the accessLog block above and set format: json for automatic field extraction.
  • For general issues, see OTel Collector troubleshooting.

Alternative: Fluent Bit

If you already run Fluent Bit, tail the Traefik access log and forward it over HTTP:
fluent-bit.conf
[INPUT]
    name  tail
    path  /var/log/traefik/access.log
    tag   traefik

[OUTPUT]
    name        http
    match       traefik
    host        ingestion.<REGION>.bronto.io
    port        443
    tls         on
    format      json_lines
    compress    gzip
    header      x-bronto-api-key    <YOUR_API_KEY>
    header      x-bronto-dataset    traefik
    header      x-bronto-collection <YOUR_COLLECTION_NAME>
Set Format to json_lines, not json. See Connect Fluent Bit to Bronto for installation.