-
Notifications
You must be signed in to change notification settings - Fork 825
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
feat: improve http span name #3603
Conversation
Remove HTTP prefix in span name to match latest semantic conventions. Set server span name with route information if present.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3603 +/- ##
==========================================
- Coverage 93.63% 93.62% -0.02%
==========================================
Files 265 265
Lines 7417 7417
Branches 1511 1511
==========================================
- Hits 6945 6944 -1
- Misses 472 473 +1
|
Technically, not a "breaking" change. However, it should be considered a behavioral change as any downstream users who are currently expecting client requests to contain the HTTP prefix might raise a bug against this. It's probably worth calling this out in the release notes a little more. |
experimental/CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ All notable changes to experimental packages in this project will be documented | |||
|
|||
### :rocket: (Enhancement) | |||
|
|||
* feat: improve http span name [#3603](https://github.com/open-telemetry/opentelemetry-js/pull/3603) @Flarna |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is considered a breaking change since any queries by span name will break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not marked as breaking in spec so why here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyhow, added an entry in breaking changes and adapted wording in feat section
const route = attributes[SemanticAttributes.HTTP_ROUTE]; | ||
if (route) { | ||
span.updateName(`${request.method || 'GET'} ${route}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an entry for this new feature in the changelog as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Short description of the changes
Remove HTTP prefix in span name to match HTTP semantic conventions 1.18.
Set server span name with route information if present.
Refs: open-telemetry/opentelemetry-specification#3165
Type of change
How Has This Been Tested?
Unittests
Checklist: