Title: Multiple root transactions have been found with this trace ID. · Issue #12000 · getsentry/sentry-javascript · GitHub
Open Graph Title: Multiple root transactions have been found with this trace ID. · Issue #12000 · getsentry/sentry-javascript
X Title: Multiple root transactions have been found with this trace ID. · Issue #12000 · 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/12000
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multiple root transactions have been found with this trace ID.","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which SDK are you using?\r\n\r\n@sentry/node\r\n\r\n### SDK Version\r\n\r\n7.114.0\r\n\r\n### Framework Version\r\n\r\n_No response_\r\n\r\n### Link to Sentry event\r\n\r\nhttps://nevados.sentry.io/performance/trace/9c985546981349e086455fec5921a7c3/?node=trace-root&statsPeriod=15m×tamp=1715607533&traceView=1\r\n\r\n### SDK Setup\r\n\r\n```js\r\n Sentry.init({\r\n dsn: 'xxx',\r\n environment: 'local',\r\n tracesSampleRate: 1.0,\r\n })\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\nI am using Fastify and Mercurius. Due to how these work, I am using custom instrumentation in their hooks.\r\n\r\n```js\r\nfp(async (fastify) => {\r\n fastify.graphql.addHook('preParsing', async (schema, document, context) => {\r\n const queryName = getQueryName(document)\r\n\r\n const span = Sentry.startInactiveSpan({\r\n name: queryName,\r\n op: 'graphql'\r\n })\r\n\r\n context.sentry = {\r\n span\r\n }\r\n })\r\n\r\n fastify.graphql.addHook('onResolution', async (execution, context) => {\r\n context.sentry.span?.end()\r\n })\r\n\r\n const fields = getFields(fastify.graphql.schema)\r\n resolvers.forEach((field) => {\r\n field.resolver = (...args) => {\r\n const context = args[2]\r\n return Sentry.withActiveSpan(context.sentry.span, () =>\r\n Sentry.startSpan(\r\n {\r\n op: 'graphql.resolve',\r\n onlyIfParent: true,\r\n name: field.name,\r\n },\r\n async () => await field.resolver(...args)\r\n )\r\n )\r\n }\r\n })\r\n})\r\n```\r\n\r\nI don't use Sentry anywhere else.\r\n\r\n\r\n### Expected Result\r\n\r\nEach transaction should have their own trace id. But for some reason, all the transactions share the same trace id. The [documentation mentions](https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#multiple-roots) that this can only happen if I set the trace id manually, but this is not the case.\r\n\r\n### Actual Result\r\n\r\n\r\n","author":{"url":"https://github.com/MoSattler","@type":"Person","name":"MoSattler"},"datePublished":"2024-05-13T13:50:40Z","url":"https://github.com/getsentry/sentry-javascript/issues/12000"}
| 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:69128234-8060-812a-14f1-98478f1f8b8c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB1A:346CFE:20428A6:2A1FFCA:6B040F39 |
| html-safe-nonce | 4b0c8b346f60854f72727939aa7b4ea96c3fea30629356eaf651afb7377db097 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjFBOjM0NkNGRToyMDQyOEE2OjJBMUZGQ0E6NkIwNDBGMzkiLCJ2aXNpdG9yX2lkIjoiMzkyMTE2NDI3MjQxMTA4NjY0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 712c54c56dbb06a243c558161e130a3c927f9ae37f54d521b4adefc4ece3467b |
| hovercard-subject-tag | issue:2292890165 |
| 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/12000/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a273b0982891562ec380772b558bf7503ab0c75d86cb3841a3a8a036b97c4e0/getsentry/sentry-javascript/issues/12000 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a273b0982891562ec380772b558bf7503ab0c75d86cb3841a3a8a036b97c4e0/getsentry/sentry-javascript/issues/12000 |
| 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 | MoSattler |
| 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