Repository navigation
docs: set the OTLP URLs in every HTTP-mode docker run - #262
Open
adityamparikh wants to merge 1 commit into
Open
adityamparikh wants to merge 1 commit into
adityamparikh wants to merge 1 commit into
Conversation
The OTLP endpoints default to localhost:4318, which suits java -jar and bootRun next to the lgtm container. Inside a container, localhost is the container itself, so every documented HTTP-mode docker run exported nowhere and logged a connection error on each attempt. Each HTTP-mode docker run now sets OTEL_TRACES_URL, OTEL_METRICS_URL and OTEL_LOGS_URL to host.docker.internal:4318. The Compose and Kubernetes examples point them at a collector host. The observability guide explains the Docker case, including the Linux steps: --add-host, and OTLP_BIND=0.0.0.0, since compose.yaml publishes 4318 on loopback only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every HTTP-mode
docker runin the docs now setsOTEL_TRACES_URL,OTEL_METRICS_URLandOTEL_LOGS_URL. The Compose and Kubernetes examples indev-docs/DEPLOYMENT.mdpoint them at a collector host. The observability guide explains the Docker case.Why
The OTLP endpoints default to
http://localhost:4318/v1/{traces,metrics,logs}, which suitsjava -jarandbootRunnext to thelgtmcontainer. Inside a container,localhostis the container itself, so the documented commands exported nowhere and logged a connection error on each export attempt: anERROR … Failed to export logsstack trace about every 10 seconds, plus span and metric failures.On Linux,
host.docker.internalalso needs--add-host=host.docker.internal:host-gateway, and LGTM has to be started withOTLP_BIND=0.0.0.0, becausecompose.yamlpublishes 4318 on loopback only. The observability guide says so.Verified
On Docker Desktop (macOS), the
solr-mcpimage run with these three URLs againstdocker compose up -d lgtmdelivered theCollectionService#checkHealthtrace to Tempo, its WARN log to Loki under the same trace ID, andhttp_server_requests_milliseconds_countto Prometheus, with no export errors.🤖 Generated with Claude Code