internal/shared/semconv: set http.route from Request.Pattern#6905
internal/shared/semconv: set http.route from Request.Pattern#6905dmathieu merged 8 commits intoopen-telemetry:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6905 +/- ##
=======================================
+ Coverage 75.5% 75.6% +0.1%
=======================================
Files 207 207
Lines 19319 19354 +35
=======================================
+ Hits 14598 14646 +48
+ Misses 4285 4273 -12
+ Partials 436 435 -1
🚀 New features to boost your workflow:
|
If Request.Pattern is set (e.g. by net/http.ServeMux), then use it for setting the http.route attribute on server request spans.
c8a8312 to
49886b7
Compare
|
semconvutil is for the 1.20.0 semantic conventions. It will disappear on the next release. |
|
@dmathieu sounds like it - I wasn't aware of that :) I'll have a look tomorrow. |
|
@dmathieu updated, I hope I'm doing the right thing now. |
Co-authored-by: Damien Mathieu <42@dmathieu.com>
|
Thanks for pointing that out @akats7. I've checked all the in-tree instrumentation and the instrumentation-specific route attribute will take precedence. |
|
Not for this PR, but we should analyze the frameworks that have those instrumentation-specific route, and see if they could be replace to setting the request's Pattern. |
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.routein the span name. I'm leaving that for another day.)