-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support query params for traces url #5152
Support query params for traces url #5152
Conversation
Can you please add a description? Why do you want such functionality? Are other SDKs supporting this? It is not common to have query parameters in POST HTTP requests. Take notice that the OpenTelemetry Specification does not require supporting query parameters. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md. Some time ago it was even saying that it MUST NOT support it: open-telemetry/opentelemetry-specification#3739 |
@pellared Added a description. From my experience query parameters are quite common in POST APIs (perhaps not a best practice), and I see no harm in adding them. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5152 +/- ##
=======================================
- Coverage 83.8% 83.6% -0.2%
=======================================
Files 248 252 +4
Lines 16345 16443 +98
=======================================
+ Hits 13709 13759 +50
- Misses 2347 2394 +47
- Partials 289 290 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our OpenTelemetry collector is deployed behind an API gateway that we don't control. The API gateway requires passing a certain query parameter - which can't be moved to a header.
I do not support such change unless it is clearly specified in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md that the implementation SHOULD honor the query URL component.
Personally, I am against such proposal. Therefore, please try to address it yourself in the https://github.com/open-telemetry/opentelemetry-specification. I guess it would be still better (and maybe even easier) to change the API gateway.
For now, I am closing the PR. We can reopen it later if needed.
Our OpenTelemetry collector is deployed behind an API gateway that we don't control. IThe API gateway requires passing a certain query parameter - which can't be moved to a header (and certainly not to the OTLP request body). For that reason, we need the http exporter to support adding query parameters.