I have spring application running with Build Ops (opentelemetry-javaagent
) generating otel scans.
And working on to export traces into Jaeger/Zipkin and Splunk Collector.
my docker-compose file:
version: "3.3"
services:
zipkin:
image: openzipkin/zipkin
container_name: zipkin
ports:
- 127.0.0.1:9411:9411
jaeger-allinone:
image : jaegertracing/all-in-one:1.25
dns_search: .
ports:
- 6831:6831/udp
- 6832:6832/udp
- 16686:16686
- 14269:14269
otel-collector-contib:
image: otel/opentelemetry-collector-contrib:latest
command: [ "--config=otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/otel-collector-config.yaml
ports:
- 4317-4318:4317-4318
- 55680:55680
depends_on:
- jaeger
- zipkin
And OTel collector config:
receivers:
zipkin:
endpoint: 0.0.0.0:9411
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
exporters:
# Logs
jaeger:
endpoint: jaeger-allinone:14250
zipkin:
endpoint: "http://localhost:9411/api/v2/spans"
format: proto
default_service_name: test_name
splunk_hec:
token: "XXXXXXX-a03a-408b-b562-XXXXXXXXX"
endpoint: "http://localhost:8088/services/collector"
max_connections: 20
disable_compression: false
timeout: 10s
service:
pipelines:
traces:
receivers: [otlp]
exporters: [jaeger,zipkin,splunk_hec]
I am getting traces from spring application but it's failing with following exception exporting it.
ZIPKIN:
{"kind": "exporter", "name": "zipkin", "error": "failed to push trace data via Zipkin exporter: Post \"http://localhost:9411/api/v2/spans\": dial tcp 127.0.0.1:9411: connect: connection refused", "interval": "9.491850181s"}
SPLUNK:
{"kind": "exporter", "name": "splunk_hec", "error": "Post \"http://localhost:8088/services/collector\": dial tcp 127.0.0.1:8088: connect: connection refused", "interval": "16.142139456s"}
What could be reason for these failures? Is there anything missing with configuration?