Title: Transactions aren't capturing async child spans · Issue #3659 · getsentry/sentry-javascript · GitHub
Open Graph Title: Transactions aren't capturing async child spans · Issue #3659 · getsentry/sentry-javascript
X Title: Transactions aren't capturing async child spans · Issue #3659 · getsentry/sentry-javascript
Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...
Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3659
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Transactions aren't capturing async child spans ","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [x] Provide a link to the affected event from your Sentry account\r\n\r\n## Package + Version\r\n\r\n- [x] `@sentry/node`\r\n\r\n### Version:\r\n\r\n```\r\n6.5.1\r\n```\r\n\r\n## Description\r\n\r\n```\r\nconst transaction = Sentry.startTransaction({\r\n\t\t\t\t\top: encodedApiFunctionToRealName[finalPublicMethodName],\r\n\t\t\t\t\tname: encodedApiFunctionToRealName[finalPublicMethodName],\r\n\t\t\t\t});\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst result = await auth(accessToken);\r\ntransaction.finish();\r\n}\r\n})\r\n```\r\n\r\nIn the above code, many mysql functions are running, but none of the spans are showing up in the log. I breakpointed inside @sentry/tracing/dist/integrations/mysql.js, and the problem seems to be this code is failing:\r\n```\r\nconst parentSpan = scope?.getSpan();\r\n```\r\n\r\ngetSpan() returns undefined.\r\n\r\nThe transaction logic doesn't seem to be very 'smart', it's not propagating the scope properly via the stack.\r\n\r\nThis is a big problem for our business, we want to switch to your product from Elastic APM but this makes that untenable.\r\n","author":{"url":"https://github.com/jpike88","@type":"Person","name":"jpike88"},"datePublished":"2021-06-09T09:56:04Z","url":"https://github.com/getsentry/sentry-javascript/issues/3659"}
| 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:f48d1c13-94f1-537e-f7c4-eb5f488b4556 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E044:3488ED:106951A:17039EC:6B044C21 |
| html-safe-nonce | f2af49b8d87617a1ec75288686ce264f0cfe57e2ccd0267c028cbc0f8d4c64b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDQ0OjM0ODhFRDoxMDY5NTFBOjE3MDM5RUM6NkIwNDRDMjEiLCJ2aXNpdG9yX2lkIjoiMjExMDQ0NTk5OTMxODM4Nzc0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6e4abda1ba78b04de36b164a909ce9a1de0fe78bd1514de7a044f5abe1f8e81c |
| hovercard-subject-tag | issue:916016285 |
| 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/3659/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6a2946d58c1c590d0ca3a6dfd45ff928d56c3f180ae7b4ec080f91831b1746a7/getsentry/sentry-javascript/issues/3659 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6a2946d58c1c590d0ca3a6dfd45ff928d56c3f180ae7b4ec080f91831b1746a7/getsentry/sentry-javascript/issues/3659 |
| og:image:alt | Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jpike88 |
| 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