Title: Txn source: "url" even though set manually in beforeNavigate() · Issue #8182 · getsentry/sentry-javascript · GitHub
Open Graph Title: Txn source: "url" even though set manually in beforeNavigate() · Issue #8182 · getsentry/sentry-javascript
X Title: Txn source: "url" even though set manually in beforeNavigate() · Issue #8182 · 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/8182
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Txn source: \"url\" even though set manually in beforeNavigate()","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/browser\n\n### SDK Version\n\n7.51.1\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n*** See linked Jira ticket ***\n\n### SDK Setup\n\n```\nSentry.init({\n dsn: _dsn,\n \n integrations: [\n new Sentry.BrowserTracing({\n tracingOrigins: [\n // ...\n ],\n beforeNavigate: (context) => {\n return {\n ...context,\n name: transactionName()\n };\n }\n }),\n \n // ...\n\n routingInstrumentation: Sentry.reactRouterV5Instrumentation(\n history,\n REACT_ROUTER_ROUTES,\n matchPath\n ),\n\n // ...\n\n });\n\n// ...\n\nexport const transactionName = () => {\n const { pathname } = window.location;\n\n // ...\n\n // temporarily fixes \u003c\u003cunparameterized>> grouping as recommended by sentry engineers\n // this unblocks analytics performance monitoring until sentry fixes an issue\n // with transaction grouping on their end. \n // ref - https://develop.sentry.dev/transaction-clustering/\n if (pathname === '/') {\n return '/';\n }\n\n // ...\n\n};\n```\n\n### Steps to Reproduce\n\nGo to customer website *** see linked Jira ticket ***\nCapture a few dozen pageloads until transaction is sampled (their tracesSampleRate is 0.1), get the id\nLook at txn in Sentry.\nExamine their `sentry.js` if needed for more detail\n\n\n### Expected Result\n\n`transaction.source: \"custom\"`\n\n\n### Actual Result\n\n`transaction.source: \"url\"`\n\nROOT CAUSE: https://github.com/getsentry/sentry-javascript/blob/ff4b1a85b3c04d2782880629b0d5be591568deaf/packages/tracing-internal/src/browser/browsertracing.ts#LL297C49-L297C49\n\nOriginal PR: https://github.com/getsentry/sentry-javascript/pull/5396\n\n┆Issue is synchronized with this [Jira Improvement](https://getsentry.atlassian.net/browse/FEEDBACK-1842) by [Unito](https://www.unito.io)\n","author":{"url":"https://github.com/maxkosty","@type":"Person","name":"maxkosty"},"datePublished":"2023-05-22T17:25:33Z","url":"https://github.com/getsentry/sentry-javascript/issues/8182"}
| 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:783bff87-dd70-086f-0bfe-e30af52993a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF3A:2BB639:1030031:16BB676:6B044C20 |
| html-safe-nonce | 89dffd7d10015e2c4a6be03281440c3223044caab3395abaac8cc143de5036f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjNBOjJCQjYzOToxMDMwMDMxOjE2QkI2NzY6NkIwNDRDMjAiLCJ2aXNpdG9yX2lkIjoiMzc5NTU3NjY3OTg5Njk5MjgwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c38006229e0f15f6a7da3421a89fe9421b8be925f2fba5745e7ff36f6edcecbe |
| hovercard-subject-tag | issue:1720114856 |
| 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/8182/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64a45cd89f2eaa8bb0a768d02ada7459f0b960ef454678ef5489e880a44dde76/getsentry/sentry-javascript/issues/8182 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64a45cd89f2eaa8bb0a768d02ada7459f0b960ef454678ef5489e880a44dde76/getsentry/sentry-javascript/issues/8182 |
| 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 | maxkosty |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| 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