René's URL Explorer Experiment


Title: Improve paramaterization of transaction names · Issue #5342 · getsentry/sentry-javascript · GitHub

Open Graph Title: Improve paramaterization of transaction names · Issue #5342 · getsentry/sentry-javascript

X Title: Improve paramaterization of transaction names · Issue #5342 · getsentry/sentry-javascript

Description: Describe the idea We need to revisit how the JS SDK captures transactions (URL routes) and sends them to sentry. Reasons for doing this and things we need to consider: parameterization: We should parameterize URLs whenever possible Becau...

Open Graph Description: Describe the idea We need to revisit how the JS SDK captures transactions (URL routes) and sends them to sentry. Reasons for doing this and things we need to consider: parameterization: We should p...

X Description: Describe the idea We need to revisit how the JS SDK captures transactions (URL routes) and sends them to sentry. Reasons for doing this and things we need to consider: parameterization: We should p...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5342

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve paramaterization of transaction names","articleBody":"## **Describe the idea**\r\nWe need to revisit how the JS SDK captures transactions (URL routes) and sends them to sentry.\r\n\r\nReasons for doing this and things we need to consider:\r\n* parameterization: We should parameterize URLs **whenever possible**  \r\n\r\nBecause\r\n\r\n* grouping: transaction name influences transaction grouping; raw URL names lead to ungroupted transactions \r\n* indexing and high cardinality: Raw URL transaction names lead to a high cardinality of transactions (because they're not grouped)\r\n* PII: Raw URL transaction names can contain sensitive data/PII (e.g. IDs, auth tokens, etc.)\r\n* Dynamic Sampling: Propagating raw URLs in DSC vs. showing parameterized routes in the Sentry UI (and the DS settings) creates a lot of user confusion\r\n\r\nBest effort has  been decent so far, but the fallback to unparameterized or whole URL maybe sub-optimal.\r\n\r\n### Examples:\r\n* Low-cardinality transaction name:\r\n  * `{\"transaction\": \"/users/{username}\", \"transaction_source\": \"route\"}`\r\n* Presumably a high-cardinality transaction name:\r\n  * `{\"transaction\": \"/users/123235\", \"transaction_source\": \"uri\"}`\r\n* User-defined transaction name, cardinality unknown:\r\n  * `{\"transaction\": \"my_transaction_name\", \"transaction_source\": \"custom\"}`\r\n\r\n## Requirement:\r\n\r\n\r\n_what should be sent and where?_\r\n\r\n[baggage header](https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#baggage-header)\r\n- `sentry-transaction`\r\n[`trace` Envelope Header](https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#envelope-header)\r\n- `transaction` (string) \r\n- transaction envelope payload\r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/47563310/176677083-84cdf9b7-3507-4c36-af7a-7021b82e7cba.png\">\r\n\r\n- error envelope payload\r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/47563310/176677351-e54c9b4d-32ed-41b9-b6be-3e1dfb89045f.png\">\r\n\r\n- in the envelope header\r\n\r\n\r\n## **Possible implementation**\r\n\r\nThere's a couple of things we can do or at least check:\r\n\r\n### Existing Routing Instrumentations with parameterization\r\n\r\nAs listed in #5345, we have a lot of popular routers covered with routing instrumentations. However, we might be able to improve paramenterizations in some of them. Hence, for each instrumentation\r\n\r\n- check if there is a way to parameterize earlier\r\n- try to match routes better (if it turns out that there are cases where our current matching fails)\r\n- (send source information; tracked in #5345)\r\n\r\n### Existing Routing Instrumentations without parameterization\r\n\r\nTODO: Check to which routers this applies\r\n\r\nThere are some routing instrumentations that don't parameterize currently. \r\n\r\n- add parameterization whenever possible \r\n\r\n### TBD: Approximative Parameterization\r\n\r\nThis has been discussed quite a bit in the past but given that we have to make our best effort for parameterization, let's revisit this topic. The idea is seemingly simple: We could try to add a mechanism that takes a raw URL and tries to guess parts of that URL that might be parameters (e.g. IDs, tokens, etc). The mechanism would then replace these parts with a generic param placeholder.\r\n\r\nExample:\r\n\r\n`/users/1235/credentials` ==> `users/:id/credentials`\r\n\r\nThere are a lot of possible issues with this because obviously, there are going to be loads of edge cases, where this approximation might be off or miss parameters completely. \r\n\r\n\r\n## _Why is this challenging?_\r\n\r\n* In the product, we have to explain why DSC might have another (or no) transaction name than what's visible in the UI\r\n* We have to explain why unparameterized routes are sent and even full URLs. \r\n* Some frameworks and routers provide unique challenges\r\n* What about custom routing instrumentations we don't control? \r\n\r\n\r\n## Places to improve parameterization \r\n- [x] nextjs (@lobsterkatie ) https://github.com/getsentry/sentry-javascript/issues/5505\r\n- [x] express integration (#5450, @Lms24)\r\n- [x] angular (#5416, @Lms24)\r\n- [x] vue (I think Vue is pretty much optimal, @lforst)\r\n- [x] react router (pretty much optimal) \r\n  - [x] react router v6 https://github.com/getsentry/sentry-javascript/pull/5515\r\n- [x] without framework (https://github.com/getsentry/sentry-javascript/pull/5411, @lforst)\n- [x] remix https://github.com/getsentry/sentry-javascript/pull/5491\n- [x] Ember\n- [ ] Gatsby\r\n\r\n\r\n","author":{"url":"https://github.com/smeubank","@type":"Person","name":"smeubank"},"datePublished":"2022-06-30T12:35:00Z","url":"https://github.com/getsentry/sentry-javascript/issues/5342"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e22376af-cc78-bd92-d6ae-2ece3a62f6d0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB3C2:14278D:2EA8D:3E19D:6B04452E
html-safe-nonce8fe3280ffdcd76c7345715d444d9d7c47b56062f2f454a803c941337ce8e443e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0MyOjE0Mjc4RDoyRUE4RDozRTE5RDo2QjA0NDUyRSIsInZpc2l0b3JfaWQiOiI1NTA5MzA3ODM5NzU3NDM2MjA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc795bffde47e2e8bd052b9fc441d195b54fcf826981b3a6eabfdc57ae571acc9
hovercard-subject-tagissue:1290072539
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/5342/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5d125a3b41db130a8bd94062caf46aa54107f81524da6c63828670e739e700c5/getsentry/sentry-javascript/issues/5342
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5d125a3b41db130a8bd94062caf46aa54107f81524da6c63828670e739e700c5/getsentry/sentry-javascript/issues/5342
og:image:altDescribe the idea We need to revisit how the JS SDK captures transactions (URL routes) and sends them to sentry. Reasons for doing this and things we need to consider: parameterization: We should p...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesmeubank
hostnamegithub.com
expected-hostnamegithub.com
Noned4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/5342#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F5342
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F5342
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/5342
Reloadhttps://github.com/getsentry/sentry-javascript/issues/5342
Reloadhttps://github.com/getsentry/sentry-javascript/issues/5342
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests53 (53)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/5342
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/5342
Improve paramaterization of transaction nameshttps://github.com/getsentry/sentry-javascript/issues/5342#top
Type: Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Improvement%22
https://github.com/smeubank
smeubankhttps://github.com/smeubank
on Jun 30, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issue-1290072539
baggage headerhttps://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#baggage-header
trace Envelope Headerhttps://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#envelope-header
https://user-images.githubusercontent.com/47563310/176677083-84cdf9b7-3507-4c36-af7a-7021b82e7cba.png
https://user-images.githubusercontent.com/47563310/176677351-e54c9b4d-32ed-41b9-b6be-3e1dfb89045f.png
#5345https://github.com/getsentry/sentry-javascript/issues/5345
Add support for transaction source #5345https://github.com/getsentry/sentry-javascript/issues/5345
@lobsterkatiehttps://github.com/lobsterkatie
Improve Nextjs tracing #5505https://github.com/getsentry/sentry-javascript/issues/5505
ref(node): Improve Express URL Parameterization #5450https://github.com/getsentry/sentry-javascript/pull/5450
@Lms24https://github.com/Lms24
feat(Angular): Add URL Parameterization of Transaction Names #5416https://github.com/getsentry/sentry-javascript/pull/5416
@Lms24https://github.com/Lms24
@lforsthttps://github.com/lforst
fix(react): Fix React Router v6 paramaterization #5515https://github.com/getsentry/sentry-javascript/pull/5515
feat(tracing): Try parameterizing URLs in default routing instrumentation #5411https://github.com/getsentry/sentry-javascript/pull/5411
@lforsthttps://github.com/lforst
fix(remix): Paramaterize server side transactions #5491https://github.com/getsentry/sentry-javascript/pull/5491
smeubankhttps://github.com/smeubank
Type: Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Improvement%22
Feature: Performancehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%3A%20Performance%22
Package: tracinghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20tracing%22
Status: Needs Discussionhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Discussion%22
on Jul 2, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-6922047759
smeubankhttps://github.com/smeubank
Lms24https://github.com/Lms24
on Jul 4, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-6928738746
https://github.com/smeubank
smeubankhttps://github.com/smeubank
on Jul 6, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1176229905
@Lms24https://github.com/Lms24
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 6, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1176233692
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 7, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1177247988
@smeubankhttps://github.com/smeubank
Lms24https://github.com/Lms24
on Jul 7, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-6951235178
vladanpaunovichttps://github.com/vladanpaunovic
on Jul 7, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-6952314184
AbhiPrasadhttps://github.com/AbhiPrasad
on Jul 8, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-6962132482
https://github.com/jamesbvaughan
jamesbvaughanhttps://github.com/jamesbvaughan
on Jul 25, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1194617120
Lms24https://github.com/Lms24
on Jul 26, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-7066432913
ref(node): Improve Express URL Parameterization (#5450)https://github.com/getsentry/sentry-javascript/commit/5e9327fd1a75f4097d6432471e0f9e83a00bd7c3
#5450https://github.com/getsentry/sentry-javascript/pull/5450
5e9327fhttps://github.com/getsentry/sentry-javascript/commit/5e9327fd1a75f4097d6432471e0f9e83a00bd7c3
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 27, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1196569074
@jamesbvaughanhttps://github.com/jamesbvaughan
@AbhiPrasadhttps://github.com/AbhiPrasad
https://github.com/jamesbvaughan
jamesbvaughanhttps://github.com/jamesbvaughan
on Aug 2, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1203092705
#5513https://github.com/getsentry/sentry-javascript/issues/5513
vladanpaunovichttps://github.com/vladanpaunovic
Lms24https://github.com/Lms24
on Aug 17, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-7206371859
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Aug 30, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1231007211
github-actionshttps://github.com/apps/github-actions
Status: Stalehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Stale%22
on Aug 30, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-7283009749
lforsthttps://github.com/lforst
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
Status: Stalehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Stale%22
on Aug 30, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-7284886939
https://github.com/vladanpaunovic
vladanpaunovichttps://github.com/vladanpaunovic
on Sep 5, 2022https://github.com/getsentry/sentry-javascript/issues/5342#issuecomment-1237095211
#5505https://github.com/getsentry/sentry-javascript/issues/5505
vladanpaunovichttps://github.com/vladanpaunovic
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 5, 2022https://github.com/getsentry/sentry-javascript/issues/5342#event-7323544560
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/5342
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/5342
Type: Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Improvement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.