feat(angular): Set url attributes on pageload and navigation spans#21985
Open
Lms24 wants to merge 2 commits into
Open
feat(angular): Set url attributes on pageload and navigation spans#21985Lms24 wants to merge 2 commits into
Lms24 wants to merge 2 commits into
Conversation
41cc9bd to
3831498
Compare
9afa5d7 to
26d8b46
Compare
Contributor
size-limit report 📦
|
Add url.full, url.path, and url.template to Angular tracing spans, resolve relative router URLs against the current origin, and extend e2e performance tests to assert the new attributes. Co-Authored-By: Cursor <cursoragent@cursor.com>
26d8b46 to
d7ce684
Compare
3831498 to
2ad4840
Compare
chargome
approved these changes
Jul 6, 2026
| data: { | ||
| 'sentry.origin': 'auto.pageload.angular', | ||
| 'sentry.source': 'route', | ||
| 'url.template': '/home/', |
Member
There was a problem hiding this comment.
q: We always want trailing slashes for this?
Member
Author
There was a problem hiding this comment.
I think we generally don't want trailing slashes, but since url.template should ideally be 100% the same as the current span description (to avoid any filtering/grouping changes in the product) I'll take it for now. We're consistent because:
- if we get a parameterized url, both
url.templateandspan.descriptionhave a trailing slash - if we don't get a paramterized url,
url.templateisn't set,url.pathhas no trailing slash and neither doesspan.description.
Not great but I think it's fine. We could adjust our instrumentation in a major to no longer set trailing slashes for paramterized routes but I'd say it's logaf-l
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adjusts the Angular routing instrumentation to set
url.templateand updateurl.fullandurl.pathwhen resolving routes. We not only have to settemplate(which we can only do in the framework/router-specific instrumentation). We also have to ensure we setfullandpathagain because in the default integration (#21952), we set it to early based on the window location path. So therefore, we update it again in the router instrumentation and re-set the raw URL (but the resolved one).ref #21921