-
Hello team! In order to seamlessly run the multitude of apps that we have at work, we created a single docker-compose file. We want to observe one of the apps within that file. Opentelemetry collector is not part of the docker-compose file (it runs as part of another docker-compose environment along with elasticsearch, kibana, etc.) and is available at In the dockerfile of the app in question I've added this line: ENV OTEL_EXPORTER_OTLP_ENDPOINT=http://host.docker.internal:4317 based on the recommendation here. This however failed: [error] [otel.javaagent 2022-05-24 17:29:22:959 +0000] [OkHttp http://host.docker.internal:4317/...] ERROR io.opentelemetry.exporter.internal.grpc.OkHttpGrpcExporter - Failed to export metrics. The request could not be executed. Full error message: timeout I was wondering if anyone has encountered the problem of connecting to the otel collector on a host from within a dockerized application and maybe they know about a solution. Is there a way to fix this without baking the entire observability app stack into our business app stack? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It just started working with the same config 🤷♂️ I am on Mac, but for a Linux environment this may need to be added to the observed docker-compose service: extra_hosts:
- "host.docker.internal:host-gateway" Resolving this. |
Beta Was this translation helpful? Give feedback.
It just started working with the same config 🤷♂️ I am on Mac, but for a Linux environment this may need to be added to the observed docker-compose service:
Resolving this.