Fix otelhttp span names to match the semantic conventions#8871
Fix otelhttp span names to match the semantic conventions#8871dmathieu wants to merge 4 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8871 +/- ##
=====================================
Coverage 83.3% 83.3%
=====================================
Files 193 193
Lines 15830 15898 +68
=====================================
+ Hits 13193 13250 +57
- Misses 2153 2164 +11
Partials 484 484
🚀 New features to boost your workflow:
|
MrAlias
left a comment
There was a problem hiding this comment.
This is close, but I think the new default formatter still misses a couple of cases needed to actually match the HTTP span-name rules.
The main issue is that it uses r.Pattern verbatim, while the rest of otelhttp already treats that value as needing normalization before it becomes http.route. There is also still a gap for nonstandard methods, where the span name should fall back to HTTP instead of the raw method string.
I’d prefer to fix those in this PR so the new default naming is aligned with the existing route/method normalization logic.
|
I have moved the span name computation into the semconv internal package, so we can reuse the |
Closes #726