Title: Keep transaction name in error event with request data extension · Issue #11025 · getsentry/sentry-javascript · GitHub
Open Graph Title: Keep transaction name in error event with request data extension · Issue #11025 · getsentry/sentry-javascript
X Title: Keep transaction name in error event with request data extension · Issue #11025 · 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/11025
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Keep transaction name in error event with request data extension","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/node\n\n### SDK Version\n\n7.106.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### SDK Setup\n\n```ts\r\nSentry.initSentry({\r\n // ...\r\n new Sentry.Integrations.RequestData({})\r\n})\r\n```\n\n### Steps to Reproduce\n\n1. Start transaction\r\n2. Rename transaction `Sentry.getActiveSpan()?.updateName(\"a\");`\r\n3. Set `Sentry.getCurrentScope().setSDKProcessingMetadata({ request: ctx.request });` from koa request\r\n4. `Sentry.captureException(new Error())`\n\n### Expected Result\n\nI expect error events created in the transaction to inherit the transaction name from the span/transaction (not sure what the difference is with recent deprecations). Instead, the `RequestData` integration overwrites the transaction name from the currently active transaction.\r\n\r\nI see there is a check in https://github.com/getsentry/sentry-javascript/blob/d51fbd32f267f665f2a04206d237c98ca612bf40/packages/utils/src/requestdata.ts#L352 that tries `!event.transasction`, but that property is not set on that event. Instead, there's a `tags.transaction` tag. \n\n### Actual Result\n\nSee above.\r\n\r\n---\r\n\r\nThe workaround of setting:\r\n\r\n\r\n```ts\r\n new Sentry.Integrations.RequestData({\r\n // @ts-expect-error\r\n transactionNamingScheme: false,\r\n }),\r\n```\r\n\r\nseems to work (I assume transaction linking is done in the backend?)","author":{"url":"https://github.com/jeengbe","@type":"Person","name":"jeengbe"},"datePublished":"2024-03-11T16:02:49Z","url":"https://github.com/getsentry/sentry-javascript/issues/11025"}
| 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:86d73812-f18a-f3d3-094c-7efa1635379b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA1E:15A4DC:1DD53AC:281B35B:6B04484F |
| html-safe-nonce | 18e846d0d0973757febc03544887f76539008b2b1ee8e83889c76f761fb79649 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTFFOjE1QTREQzoxREQ1M0FDOjI4MUIzNUI6NkIwNDQ4NEYiLCJ2aXNpdG9yX2lkIjoiNzc1NjQyNTY3NTIzMzU3NzAzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9d78f87192e16142d17323bb808fb98d9312ca342ddf133445352e9589995a92 |
| hovercard-subject-tag | issue:2179510074 |
| 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/11025/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4014261386eca6044d46145a956cfd3163ec0c6039e1eb60a0b336adf6d78921/getsentry/sentry-javascript/issues/11025 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4014261386eca6044d46145a956cfd3163ec0c6039e1eb60a0b336adf6d78921/getsentry/sentry-javascript/issues/11025 |
| 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 | jeengbe |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| 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 | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| 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