Skip to content

Query Params passed in the endpoint URL are ignored (or) dropped #6725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
leelabysani opened this issue May 1, 2025 · 1 comment
Open
Labels
blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made enhancement New feature or request

Comments

@leelabysani
Copy link

Problem Statement

When setting an explicit OTLP metrics endpoint URL using WithEndpointURL or OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, any query parameters passed along in the URL are dropped or ignored. This makes it impossible to send query parameters to an endpoint which has a must requirement.

Proposed Solution

We should implement an API which accepts query parameters called WithQueryParams() and if there are any query parameters passed in the endpoint URL, we should save them and use it during URL construction.

Alternatives

A clear and concise description of any alternative solutions or features you've considered.

Prior Art

A clear and concise list of any similar and existing solutions from other projects that provide context to possible solutions.

Additional Context

Add any other context or screenshots about the feature request here.

@leelabysani leelabysani added the enhancement New feature or request label May 1, 2025
@MrAlias
Copy link
Contributor

MrAlias commented May 2, 2025

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options

Endpoint (OTLP/HTTP): Target URL to which the exporter is going to send spans, metrics, or logs.
The implementation MUST honor the following URL components:

  • scheme (http or https)
  • host
  • port
  • path

The implementation MAY ignore all other URL components.

The current implementation is compliant with the specification. We do not plan to change our implementation based on the current state of the specification.

@pellared pellared added the blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants