Skip to content

docs: set the OTLP URLs in every HTTP-mode docker run - #262

Open
adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:docs/otel-urls-docker
Open

adityamparikh wants to merge 1 commit into
apache:mainfrom
adityamparikh:docs/otel-urls-docker

Conversation

@adityamparikh

Copy link
Copy Markdown
Contributor

What

Every HTTP-mode docker run in the docs now sets OTEL_TRACES_URL, OTEL_METRICS_URL and OTEL_LOGS_URL. The Compose and Kubernetes examples in dev-docs/DEPLOYMENT.md point 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 suits java -jar and bootRun next to the lgtm container. Inside a container, localhost is the container itself, so the documented commands exported nowhere and logged a connection error on each export attempt: an ERROR … Failed to export logs stack trace about every 10 seconds, plus span and metric failures.

On Linux, host.docker.internal also needs --add-host=host.docker.internal:host-gateway, and LGTM has to be started with OTLP_BIND=0.0.0.0, because compose.yaml publishes 4318 on loopback only. The observability guide says so.

Verified

On Docker Desktop (macOS), the solr-mcp image run with these three URLs against docker compose up -d lgtm delivered the CollectionService#checkHealth trace to Tempo, its WARN log to Loki under the same trace ID, and http_server_requests_milliseconds_count to Prometheus, with no export errors.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant