Title: [Remix] Traces that start in the backend do not end after the interaction that caused them when using Meta helper · Issue #9820 · getsentry/sentry-javascript · GitHub
Open Graph Title: [Remix] Traces that start in the backend do not end after the interaction that caused them when using Meta helper · Issue #9820 · getsentry/sentry-javascript
X Title: [Remix] Traces that start in the backend do not end after the interaction that caused them when using Meta helper · Issue #9820 · 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/9820
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Remix] Traces that start in the backend do not end after the interaction that caused them when using Meta helper","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\nlatest\n\n### Framework Version\n\nRemix v2\n\n### Link to Sentry event\n\nhttps://meisen-haus-3.sentry.io/discover/remix:fcccc9dbacd1499385106cc753c6b547/?field=title&field=event.type&field=project&field=user.display&field=timestamp&field=replayId&homepage=true&name=All+Events&project=4506384513368064&query=&sort=-timestamp&statsPeriod=14d&yAxis=count%28%29\n\n### SDK Setup\n\n\r\n``` \r\n//entry.server.tsx\r\n\r\nexport function handleError(error, { request }) {\r\n Sentry.captureRemixServerException(error, 'remix.server', request);\r\n}\r\n\r\nSentry.init({\r\n dsn: \"https://c8f0b4c1af5ed393c9b73d4cdab42b0a@o1280942.ingest.sentry.io/4506384513368064\",\r\n tracesSampleRate: 1,\r\n release: \"test3\"\r\n})\r\n```\r\n\r\n```\r\n//root.tsx\r\n\r\nexport const ErrorBoundary = () => {\r\n const error = useRouteError();\r\n captureRemixErrorBoundaryError(error);\r\n return \u003cdiv>Something went wrong\u003c/div>;\r\n};\r\n\r\n// Sentry provides a type for Remix v2 MetaFunction parameters\r\n// so you can access `data.sentryTrace` and `data.sentryBaggage` alongside other data from loader.\r\nimport type { SentryMetaArgs } from \"@sentry/remix\";\r\n\r\nexport const meta = ({ data }: SentryMetaArgs\u003cMetaFunction\u003ctypeof loader>>) => {\r\n return [\r\n {\r\n name: \"sentry-trace\",\r\n content: data.sentryTrace,\r\n },\r\n {\r\n name: \"baggage\",\r\n content: data.sentryBaggage,\r\n },\r\n ];\r\n};\r\n```\r\n\r\n``` \r\n// entry.client.tsx\r\n\r\nSentry.init({\r\n dsn: \"https://c8f0b4c1af5ed393c9b73d4cdab42b0a@o1280942.ingest.sentry.io/4506384513368064\",\r\n tracesSampleRate: 1,\r\n replaysSessionSampleRate: 0.1,\r\n replaysOnErrorSampleRate: 1,\r\n\r\n integrations: [new Sentry.BrowserTracing({\r\n routingInstrumentation: Sentry.remixRouterInstrumentation(useEffect, useLocation, useMatches)\r\n }), new Sentry.Replay()],\r\n release: \"test3\"\r\n})\r\n\r\n...\r\n\r\nexport default withSentry(App)\r\n```\n\n### Steps to Reproduce\n\nwith a route like:\r\n\r\n```\r\n//routes/_index.tsx\r\n\r\nexport default function Index() {\r\n \r\n const data = useLoaderData()\r\n return (\r\n \u003cdiv style={{ fontFamily: \"system-ui, sans-serif\", lineHeight: \"1.8\" }}>\r\n \u003ch1>Welcome to Remix\u003c/h1>\r\n \u003cLink to=\"/dashboard\">Dashboard\u003c/Link>;\r\n \u003cul>\r\n \u003cli>\r\n \u003ca\r\n target=\"_blank\"\r\n href=\"https://remix.run/tutorials/blog\"\r\n rel=\"noreferrer\"\r\n >\r\n 15m Quickstart Blog Tutorial\r\n \u003c/a>\r\n \u003c/li>\r\n \u003cli>\r\n \u003ca\r\n target=\"_blank\"\r\n href=\"https://remix.run/tutorials/jokes\"\r\n rel=\"noreferrer\"\r\n >\r\n Deep Dive Jokes App Tutorial\r\n \u003c/a>\r\n \u003c/li>\r\n \u003cli>\r\n \u003ca target=\"_blank\" href=\"https://remix.run/docs\" rel=\"noreferrer\">\r\n Remix Docs\r\n \u003c/a>\r\n \u003c/li>\r\n \u003c/ul>\r\n {JSON.stringify(data)}\r\n \u003c/div>\r\n );\r\n```\r\n\r\nWhen I load this route and then navigate to /dashboard I get a trace like this: https://meisen-haus-3.sentry.io/performance/trace/20adc19248fd425a8834433de7e6aa68/?limit=100&pageEnd=2023-12-14T01%3A44%3A01.521&pageStart=2023-12-13T01%3A43%3A56.416\n\n### Expected Result\n\nI would expect two traces\r\n\r\none that includes a pageload and http.server transaction\r\n\r\nanother that includes a navigation and http.server transaction\n\n### Actual Result\n\nI get two traces but one contains a pageload and two http.server events (that are not really related) https://meisen-haus-3.sentry.io/performance/trace/20adc19248fd425a8834433de7e6aa68/?limit=100&pageEnd=2023-12-14T01%3A44%3A01.521&pageStart=2023-12-13T01%3A43%3A56.416\r\n\r\nThe other contains a navigation event https://meisen-haus-3.sentry.io/discover/remix:fcccc9dbacd1499385106cc753c6b547/?field=title&field=event.type&field=project&field=user.display&field=timestamp&field=replayId&homepage=true&name=All+Events&project=4506384513368064&query=&sort=-timestamp&statsPeriod=14d&yAxis=count%28%29","author":{"url":"https://github.com/souredoutlook","@type":"Person","name":"souredoutlook"},"datePublished":"2023-12-13T13:50:32Z","url":"https://github.com/getsentry/sentry-javascript/issues/9820"}
| 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:43fd73ab-9aa4-b844-1436-04094d1689c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABA0:27A9B8:19E74D3:2204983:6B040988 |
| html-safe-nonce | 234e1ebe4cc9964c3ed40263efdff85e03397793755a75b095f8dfda9b1a4cf6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkEwOjI3QTlCODoxOUU3NEQzOjIyMDQ5ODM6NkIwNDA5ODgiLCJ2aXNpdG9yX2lkIjoiNjg2MDM0ODMxNzM0ODY2MTY0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7bc00bf9fed9e8b7b0287401da23b754de8f2ef17a78e448cd0c2e5b2797af05 |
| hovercard-subject-tag | issue:2039757662 |
| 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/9820/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cc685039b1bb4edb06e7f8700c0390798a5f637ec503ffb5290430e59bd4ec1e/getsentry/sentry-javascript/issues/9820 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cc685039b1bb4edb06e7f8700c0390798a5f637ec503ffb5290430e59bd4ec1e/getsentry/sentry-javascript/issues/9820 |
| 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 | souredoutlook |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| 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