Title: Transaction names are not properly parameterized with react-router v6 · Issue #5513 · getsentry/sentry-javascript · GitHub
Open Graph Title: Transaction names are not properly parameterized with react-router v6 · Issue #5513 · getsentry/sentry-javascript
X Title: Transaction names are not properly parameterized with react-router v6 · Issue #5513 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5513
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Transaction names are not properly parameterized with react-router v6","articleBody":"### Is there an existing issue for this?\n\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [X] I have reviewed the documentation https://docs.sentry.io/\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which package are you using?\n\n@sentry/react\n\n### SDK Version\n\n7.8.0\n\n### Framework Version\n\n18.1.0\n\n### Link to Sentry event\n\nhttps://sentry.io/organizations/arcol-og/performance/summary/?environment=dev&project=6576795&query=transaction.duration%3A%3C15m+transaction.op%3Apageload&statsPeriod=1h&transaction=%2Fprojects%2Fe7962d8a-e041-4006-9f44-d84ffabbdad9%2Fviews%2F982ebfaa-1e51-4726-9ca4-b04869e395b5&unselectedSeries=p100%28%29\n\n### Steps to Reproduce\n\nHere's a simplified version of my relevant react-router (`react-router-dom` version `6.2.1`) and Sentry config:\r\n\r\n```tsx\r\nSentry.init({\r\n ...\r\n integrations: [\r\n new BrowserTracing({\r\n routingInstrumentation: Sentry.reactRouterV6Instrumentation(\r\n useEffect,\r\n useLocation,\r\n useNavigationType,\r\n createRoutesFromChildren,\r\n matchRoutes,\r\n ),\r\n }),\r\n ],\r\n});\r\n\r\nconst SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes);\r\n\r\nconst MyRoutes = () => {\r\n return (\r\n \u003cSentryRoutes>\r\n \u003cRoute index element={\u003cNavigate to=\"/projects\" />} />\r\n\r\n \u003cRoute path=\"/account\" element={\u003cAccountPage />} />\r\n\r\n \u003cRoute path=\"/projects\">\r\n \u003cRoute index element={\u003cProjectBrowser />} />\r\n\r\n \u003cRoute path=\":projectId\" element={\u003cProjectPage />}>\r\n \u003cRoute index element={\u003cProjectPageRoot />} />\r\n\r\n \u003cRoute element={\u003cEditorPage />}>\r\n \u003cRoute path=\"views/:viewId\" element={\u003cViewCanvas />} />\r\n \u003cRoute path=\"spaces/:spaceId\" element={\u003cSpaceCanvas />} />\r\n \u003c/Route>\r\n \u003c/Route>\r\n \u003c/Route>\r\n\r\n \u003cRoute path=\"*\" element={\u003cNoMatchPage />} />\r\n \u003c/SentryRoutes>\r\n );\r\n};\r\n\r\nexport default MyRoutes\r\n```\r\n\r\nAs far as I can tell, I'm not doing anything unusual, except possibly the use of react router's Outlets and Layout Routes.\n\n### Expected Result\n\nWith this config, I'd expect to get transactions with names like `/projects/:projectId/views/:viewId`.\n\n### Actual Result\n\nInstead, I'm getting transactions with names like `/projects/e7962d8a-e041-4006-9f44-d84ffabbdad9/views/982ebfaa-1e51-4726-9ca4-b04869e395b5`.","author":{"url":"https://github.com/jamesbvaughan","@type":"Person","name":"jamesbvaughan"},"datePublished":"2022-08-02T18:49:26Z","url":"https://github.com/getsentry/sentry-javascript/issues/5513"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e2aad71f-ac0e-25ce-42f2-8e39c5205656 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF6C:3AA6A6:D19FA:11E1C7:6B044787 |
| html-safe-nonce | 486ff22812294817cdd5052e231fd6565800817fba6a3ad632c5b4de7b91bde1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjZDOjNBQTZBNjpEMTlGQToxMUUxQzc6NkIwNDQ3ODciLCJ2aXNpdG9yX2lkIjoiNzcwNjIwNjI4OTA4ODc1OTY4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 42f091779e99f4cd1c15ac306548c5fe277663c1fa88246ca23f657a02b9f407 |
| hovercard-subject-tag | issue:1326263247 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/5513/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9a6fa6a451896bc72f8ec999221c8371ad2212af82b00d503b93cdf33b2dffc1/getsentry/sentry-javascript/issues/5513 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9a6fa6a451896bc72f8ec999221c8371ad2212af82b00d503b93cdf33b2dffc1/getsentry/sentry-javascript/issues/5513 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jamesbvaughan |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width