DOC(exporter-otlp-proto-http): clarify endpoint= kwarg requires full signal path - #5633
DOC(exporter-otlp-proto-http): clarify endpoint= kwarg requires full signal path#5633karlhillx wants to merge 2 commits into
Conversation
… path
The endpoint= kwarg is used verbatim, while OTEL_EXPORTER_OTLP_ENDPOINT
gets the signal path appended in _resolve_endpoint. The existing
docstring ('Target URL to which the exporter is going to send ...')
doesn't say which of the two the kwarg carries, so users who pass a
base URL with a settings layer or secrets manager get a permanent 404
at the collector with no hint why.
Document that endpoint= must include the full signal path, and that
OTEL_EXPORTER_OTLP_ENDPOINT is the right knob for a base URL.
Closes open-telemetry#5628.
|
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to accurate docstring clarifications consistent with the described behavior and scope (HTTP exporters only).
Pull request overview
This PR clarifies the OTLP/HTTP exporters’ endpoint= constructor argument semantics: when passed explicitly it must be the full signal-specific URL (including /v1/{signal}), while the base-URL behavior is provided via OTEL_EXPORTER_OTLP_ENDPOINT. This addresses the user confusion described in #5628 without changing runtime behavior.
Changes:
- Updated
endpointparameter docstring for the OTLP/HTTP trace exporter to require the full signal path and to referenceOTEL_EXPORTER_OTLP_ENDPOINTfor base-URL configuration. - Applied the same clarification to the OTLP/HTTP metrics exporter docstring.
- Applied the same clarification to the OTLP/HTTP logs exporter docstring.
File summaries
| File | Description |
|---|---|
| exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/init.py | Clarifies endpoint= must include /v1/traces; points base-URL users to OTEL_EXPORTER_OTLP_ENDPOINT. |
| exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/init.py | Clarifies endpoint= must include /v1/metrics; points base-URL users to OTEL_EXPORTER_OTLP_ENDPOINT. |
| exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/init.py | Clarifies endpoint= must include /v1/logs; points base-URL users to OTEL_EXPORTER_OTLP_ENDPOINT. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request dashboard statusWaiting on reviewers · refreshed 2026-09-06 02:25 UTC Review the latest changes. Status above doesn't look right?
|
Closes #5628.
The
endpoint=kwarg is used verbatim, but the env-var path appendsthe signal path in
_resolve_endpoint. The previous docstring("Target URL to which the exporter is going to send ...") didn't
distinguish the two, so users passing a base URL got a permanent 404
at the collector with no hint why.
State the full signal path requirement on the kwarg and point at
OTEL_EXPORTER_OTLP_ENDPOINTfor the base-URL case. Behavior unchanged.Scope: the three HTTP exporters (trace, metric, log). The gRPC
exporters route by service, not path, so they were left alone.