I am just getting started with jaeger/hotrod. I am running from docker compose (config below). I can see that the hotrod UI is running, and is able to click on it to initiate actions. The Jaeger instance seems to be running ok, but is not receiving any traces.
When running, the hotrod service is reporting this:
2024/02/18 14:08:22 traces export: Post "http://localhost:4318/v1/traces": dial tcp 127.0.0.1:4318: connect: connection refused
... what seems to happening is that hotrod is trying to report it's traces to itself, and that fails because of course it does. The various environment variables that are commented out in the config below, and more, have all been tried given exactly the same error as above. In short, it does not seem like any of the configurations I give the hotrod app makes it deviate from sending traces to localhost:4318.
What am I doing wrong, and how can I fix it?
hotrod:
image: jaegertracing/example-hotrod:latest
ports:
- "8090:8080"
- "8083:8083"
command: [ "all" ]
environment:
#- JAEGER_AGENT_HOST=jaeger
#- JAEGER_AGENT_PORT=6831
# - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318
# - OTEL_EXPORTER_JAEGER_ENDPOINT=http://jaeger:14268/api/traces
depends_on:
- jaeger
jaeger:
image: jaegertracing/all-in-one:latest
volumes:
- "./jaeger-ui.json:/etc/jaeger/jaeger-ui.json"
command: --query.ui-config /etc/jaeger/jaeger-ui.json --reporter.grpc.host-port=jaeger-collector.jaeger-infra.svc:14250
environment:
- METRICS_STORAGE_TYPE=prometheus
- PROMETHEUS_SERVER_URL=http://prometheus:9090
- COLLECTOR_OTLP_ENABLED=true
ports:
- "14250:14250"
- "14268:14268"
- "6831:6831/udp"
- "16686:16686"
- "16685:16685"
- "4317:4317"
- "4318:4318"
You have OTEL_EXPORTER_OTLP_ENDPOINT in hotrod commented out, which is why the address defaults to localhost.
There is a working example in the repository: https://github.com/jaegertracing/jaeger/blob/main/examples/hotrod/docker-compose.yml