Title: React Router transactions are not parameterized when the URL has a percent-encoded parameter · Issue #25638 · getsentry/sentry-javascript · GitHub
Open Graph Title: React Router transactions are not parameterized when the URL has a percent-encoded parameter · Issue #25638 · getsentry/sentry-javascript
X Title: React Router transactions are not parameterized when the URL has a percent-encoded parameter · Issue #25638 · 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/25638
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"React Router transactions are not parameterized when the URL has a percent-encoded parameter","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 SDK are you using?\n\n@sentry/react\n\n### SDK Version\n\n11.8.0 (reproduced on `develop` at 67fed317ce; also present in 9.47.1)\n\n### Framework Version\n\nReact 19.2, react-router 7.18\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```tsx\nSentry.init({\n dsn: '...',\n integrations: [Sentry.reactRouterBrowserTracingIntegration()],\n tracesSampleRate: 1,\n});\n\nconst SentryRoutes = Sentry.wrapReactRouterRouting(Routes);\n\n\u003cBrowserRouter>\n \u003cSentryRoutes>\n \u003cRoute path=\"/clubs/:clubId\" element={\u003cClub />} />\n \u003c/SentryRoutes>\n\u003c/BrowserRouter>\n```\n\nMinimal failing test against `develop` (same setup as `packages/react/test/react-router.test.tsx`):\n\n```tsx\nrender(\n // what a browser's location.pathname holds for /clubs/한글\n \u003cMemoryRouter initialEntries={['/clubs/%ED%95%9C%EA%B8%80']}>\n \u003cSentryRoutes>\n \u003cRoute path=\"/clubs/:clubId\" element={\u003cdiv>Club\u003c/div>} />\n \u003c/SentryRoutes>\n \u003c/MemoryRouter>,\n);\n\nexpect(getCurrentScope().getScopeData().transactionName).toEqual('/clubs/:clubId');\n// Received: \"/clubs/%ED%95%9C%EA%B8%80\"\n```\n\n### Steps to Reproduce\n\n1. Define a route with a dynamic segment, e.g. `/clubs/:clubId`.\n2. Open a URL whose parameter is not plain ASCII, e.g. `/clubs/한글` (the browser stores it as `/clubs/%ED%95%9C%EA%B8%80`).\n3. Look at the pageload or navigation transaction name.\n\n### Expected Result\n\nTransaction name `/clubs/:clubId` with `sentry.segment.name.source: route`, like for `/clubs/abc`.\n\n### Actual Result\n\nTransaction name is the raw URL `/clubs/%ED%95%9C%EA%B8%80` with source `url`, so every parameter value becomes its own transaction name. For descendant routes (`\u003cRoutes>` nested under a `/*` route) the raw URL is reported with source `route`.\n\nMechanism: React Router decodes the pathname before matching (`decodePath`, segment-wise `decodeURIComponent`), so `RouteMatch.pathname` / `pathnameBase` are decoded, while `useLocation().pathname` is still percent-encoded. `getNormalizedName` in `packages/react/src/reactrouter-compat-utils/utils.ts` compares the two with `===`:\n\n```ts\nif (trimSlash(location.pathname) !== trimSlash(basename + branch.pathname)) {\n continue;\n}\n```\n\nso no branch ever matches for such URLs. `rebuildRoutePathFromAllRoutes` and `reconstructNameFromDescendantParent` strip the decoded `pathnameBase` from the encoded pathname in the same way.\n\n### Additional Context\n\nI have a fix with tests ready and will open a PR right after this issue.\n\n### Priority\n\nMedium\n","author":{"url":"https://github.com/seongwon030","@type":"Person","name":"seongwon030"},"datePublished":"2026-10-22T03:18:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/25638"}
| 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:fd55fe27-0d00-a70e-4284-09646a37811c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2B6:1B0314:52A62:71032:6B042B24 |
| html-safe-nonce | a2fe52933f2bc18c0b7eb6721100ab7b2e3b403ccf5785ff1044c23ca41c9bb7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkI2OjFCMDMxNDo1MkE2Mjo3MTAzMjo2QjA0MkIyNCIsInZpc2l0b3JfaWQiOiI0MzY1NDk5MTE3NTg2MzYxMTI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a5d0bf3a882914d678803586d36cb8bee4a403d65601c881a639bce82695e28b |
| hovercard-subject-tag | issue:5972405074 |
| 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/25638/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ff5def1afeae70cad71057422be70fe53f01cfe9585d701a1b6bbb8cd3496d8/getsentry/sentry-javascript/issues/25638 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ff5def1afeae70cad71057422be70fe53f01cfe9585d701a1b6bbb8cd3496d8/getsentry/sentry-javascript/issues/25638 |
| 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 | seongwon030 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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