feat: Add navigation.route.id and adjust pageload and navigation description rules#468
Open
Lms24 wants to merge 1 commit into
Open
feat: Add navigation.route.id and adjust pageload and navigation description rules#468Lms24 wants to merge 1 commit into
navigation.route.id and adjust pageload and navigation description rules#468Lms24 wants to merge 1 commit into
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
navigation.route.id and use it in description rulenavigation.route.id and adjust pageload and navigation description rules
nsdeschenes
approved these changes
Jul 9, 2026
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.
Some routing frameworks like Vue or React Router, allow giving specific routes custom names/identifiers. For example, the
/aboutroute could get nameAboutView. Our instrumentation prefers the custom-set names over the parameterized route when it is available and writes that as the span description (transactions) or name (streaming).This PR adds a new
navigation.route.idattribute which will hold the custom route identifier. I decided to avoid theurl.namespace because it has nothing to do with a url. There's alsohttp.routebut I'm not sure if it would be a better fit (orhttp.route.idfwiw), since this attribute is mostly used in server-side route handler instrumentation like Express. Therefore I decided to go withnavigation.route.idwhich is used on the client side (and will be used more via #467).To ensure our span description inference rules map the correct description, this PR also updates the inference rules to prefer the new attribute over
url.template.If reviewers have concerns about the inference rule or the attribute name, I'm happy to change them!