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

internal/shared/semconvutil: set http.route from Request.Pattern #6905

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

axw
Copy link

@axw axw commented Mar 10, 2025

If Request.Pattern is set (e.g. by net/http.ServeMux), then use it for setting the http.route attribute on server request spans.

Related to #6193

(But does not close that, since according to https://opentelemetry.io/docs/specs/semconv/http/http-spans/#name we SHOULD use http.route in the span name. I'm leaving that for another day.)

@axw axw requested review from dmathieu and a team as code owners March 10, 2025 02:00
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.1%. Comparing base (bdfe050) to head (49886b7).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6905   +/-   ##
=====================================
  Coverage   76.1%   76.1%           
=====================================
  Files        220     220           
  Lines      21448   21484   +36     
=====================================
+ Hits       16332   16368   +36     
  Misses      4557    4557           
  Partials     559     559           
Files with missing lines Coverage Δ
...stful/otelrestful/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
...gonic/gin/otelgin/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
...rilla/mux/otelmux/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
...ack/echo/otelecho/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
...ace/otelhttptrace/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
...net/http/otelhttp/internal/semconvutil/httpconv.go 95.7% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@axw axw marked this pull request as draft March 10, 2025 02:19
If Request.Pattern is set (e.g. by net/http.ServeMux),
then use it for setting the http.route attribute on
server request spans.
@axw axw force-pushed the otelhttp-httproute-pattern branch from c8a8312 to 49886b7 Compare March 10, 2025 02:30
@axw axw changed the title otelhttp: set http.route from Request.Pattern internal/shared/semconvutil: set http.route from Request.Pattern Mar 10, 2025
@axw axw marked this pull request as ready for review March 10, 2025 03:24
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.

1 participant