Skip to content
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

Fix http clients method attribute in case of non standard http methods #2726

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

emdneto
Copy link
Member

@emdneto emdneto commented Jul 22, 2024

Description

We have the http.method attribute in spans for non-standard HTTP methods as HTTP instead of _OTHER . I identified instrumentations affected are requests, aiohttp-client and httpx

Right now, he have this in case of requests using nonstandard http methods, will generate span:

  • Span Name: HTTP
  • http.method: "HTTP"

And we must have:

  • Span Name: HTTP
  • http.method: "_OTHER"

For new semconv we must have in case of a request with method="NONSTANDARD":

  • Span Name: HTTP
  • http.request.method: "_OTHER"
  • http.request.method_original: "NONSTANDARD"

See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/http.md and https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#name

@github-actions github-actions bot requested a review from ocelotl July 22, 2024 17:39
@emdneto emdneto changed the title Fix/http clients method attribute Fix http clients method attribute in case of non standard http methods Jul 22, 2024
@emdneto emdneto requested a review from lzchen July 22, 2024 17:39
@emdneto emdneto self-assigned this Jul 22, 2024
@emdneto emdneto requested a review from a team July 22, 2024 17:53
@emdneto emdneto force-pushed the fix/http-clients-method-attribute branch 2 times, most recently from e676850 to 3ff4a78 Compare July 22, 2024 19:27
@lzchen lzchen merged commit cc52bd2 into open-telemetry:main Jul 22, 2024
377 checks passed
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.

3 participants