Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

OpenTelemetry Collector cannot send traces to Jaeger in Docker Compose

ErrorJaeger UI at :16686 shows no traces from the app

Short answer

When a Collector container cannot deliver traces to Jaeger, check three things: the exporter is listed in service.pipelines (defining it is not enough), the endpoint uses the Jaeger service name and port 4317 instead of localhost, and TLS is set to insecure for a plain connection inside the compose network.

  • Applies to OpenTelemetry Collector (contrib), Jaeger v2, Docker Compose 2
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Turn on the debug exporter next to the Jaeger one. If spans print there, the Collector works and the problem is on the way to Jaeger.

    docker compose logs --tail 50 otel-collector
  2. 2Match what you see, then jump to its fix

    1. 1No export attempts and no errors in the Collector logThe exporter is defined but not in a pipelineFix
    2. 2connection refused to localhost:4317 in the Collector logThe endpoint says localhost instead of the Jaeger serviceFix
    3. 3Collector log shows a TLS-related error when exportingTLS is expected but Jaeger listens in plain textFix

What does the error look like?

  • Jaeger UI at :16686 shows no traces from the app
  • Collector is running but nothing arrives in Jaeger

Cause 1 of 3

The exporter is defined but not in a pipeline

1Check

The docs say defining an exporter does not enable it; it must also be listed in service.pipelines.

grep -n -A6 "pipelines" otel-collector-config.yaml

2Fix

Add the exporter to the traces pipeline.

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlp_grpc/jaeger, debug]

3Verify

Restart the Collector and send one request through the app.

docker compose restart otel-collector

Confirmed by opentelemetry.io

Did this fix it?

Cause 2 of 3

The endpoint says localhost instead of the Jaeger service

1Check

Inside a Compose network, containers reach each other by service name and the container port. localhost is the Collector itself.

grep -n "endpoint" otel-collector-config.yaml

2Fix

Point the exporter at the Jaeger service name on port 4317, which the Jaeger run command publishes.

exporters:
  otlp_grpc/jaeger:
    endpoint: jaeger:4317

3Verify

Open the Jaeger UI and search for the service.

curl -s -o /dev/null -w '%{http_code}' http://localhost:16686

Confirmed by docs.docker.com

Did this fix it?

Cause 3 of 3

TLS is expected but Jaeger listens in plain text

1Check

The docs describe the tls insecure option as disabling TLS verification, and not recommended for production. Compare it with how Jaeger is exposed.

grep -n -B2 -A3 "tls" otel-collector-config.yaml

2Fix

Inside a private compose network, set tls insecure on the exporter. For production, use certificates instead.

exporters:
  otlp_grpc/jaeger:
    endpoint: jaeger:4317
    tls:
      insecure: true

3Verify

Restart the Collector and check the log has no TLS errors.

docker compose restart otel-collector && docker compose logs --tail 20 otel-collector

Confirmed by opentelemetry.io

Did this fix it?

How do I stop it coming back?

  • Keep the debug exporter in the pipeline while you set a new setup up, and remove it after.
  • Use service names and container ports for every container-to-container address.
  • Pin the Jaeger and Collector image versions so a pull does not change behaviour.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.