feat(net/http/otelhttp): Add http.route attribute#8632
feat(net/http/otelhttp): Add http.route attribute#8632gaiaz-iusipov wants to merge 14 commits intoopen-telemetry:mainfrom
http.route attribute#8632Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8632 +/- ##
=====================================
Coverage 82.1% 82.2%
=====================================
Files 183 183
Lines 13798 13810 +12
=====================================
+ Hits 11340 11352 +12
Misses 2054 2054
Partials 404 404
🚀 New features to boost your workflow:
|
pellared
left a comment
There was a problem hiding this comment.
Can you please create an issue first?
It's recommended that you signal your intention to contribute in the issue tracker, either by filing a new issue or by claiming an existing one.
|
Could this be done with a Labeler? |
|
I created an issue where I tried to explain my motivation: #8633 |
|
I changed the logic so that the attribute is recorded by default, with an option to disable it. There is also still the question of moving the |
http.route attribute
Sure it could, but @pellared pointed out in the issue that this attribute should always (when it is available) be recorded by default. |
|
Sure, though this is not what that PR was doing when I left my comment. |
So it turns out the option is not needed at all. What about moving the |
|
I think this PR is ready to merge. |
|
I'm waiting for @pellared's review, since he requested changes. |
In this pull request, I add recording of the
http.routemetric attribute fornet/http/otelhttp.The
routeFromRequestfunction code is duplicated, and it might be better to move it tosemconv.HTTPServer.