opentelemetry: set _other for unknown http methods#45222
Open
jakebennert wants to merge 3 commits into
Open
Conversation
…er in the case of an unknown HTTP method, as defined in the OpenTelemetry semantic conventions.
|
Hi @jakebennert, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
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.
Commit Message
The OpenTelemetry semantic conventions state, for both client and server spans:
HTTP request method value SHOULD be “known” to the instrumentation. By default, this convention defines “known” methods as the ones listed in RFC9110, the
PATCHmethod defined in RFC5789 and theQUERYmethod defined in httpbis-safe-method-w-body.If the HTTP request method is not known to instrumentation, it MUST set the
http.request.methodattribute to_OTHER.This PR updates Envoy's OpenTelemetry tracer to align with this standard.
Additional Description
AI was used to generate the code and tests in this PR. I have reviewed – and fully understand – the code.
It should be noted that Envoy's OTel tracer uses
http.methodinstead of the more up-to-datehttp.request.method. However, I believe there is ongoing work to update these names happening in #45184.Risk Level
Low
Testing
I've added unit tests that exercise the new code.
Docs Changes
None required
Release Notes
Added a changelog under minor_behavior_changes (area: opentelemetry).
Platform Specific Features
None