Title: Problematic API: `Scope.setTransactionName()` · Issue #5660 · getsentry/sentry-javascript · GitHub
Open Graph Title: Problematic API: `Scope.setTransactionName()` · Issue #5660 · getsentry/sentry-javascript
X Title: Problematic API: `Scope.setTransactionName()` · Issue #5660 · getsentry/sentry-javascript
Description: We've identified this API, or rather its implementation as problematic. Scope.setTransactionName() will populate the transaction field of any event that comes after that call on that scope (and any scopes that were cloned from that scope...
Open Graph Description: We've identified this API, or rather its implementation as problematic. Scope.setTransactionName() will populate the transaction field of any event that comes after that call on that scope (and any...
X Description: We've identified this API, or rather its implementation as problematic. Scope.setTransactionName() will populate the transaction field of any event that comes after that call on that scope (and...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5660
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Problematic API: `Scope.setTransactionName()`","articleBody":"We've identified this API, or rather its implementation as problematic.\r\n\r\n`Scope.setTransactionName()` will populate the `transaction` field of any event that comes after that call on that scope (and any scopes that were cloned from that scope).\r\n\r\nThe `transaction` field is used for associating an error with a transaction (not an actual transaction event in Sentry but rather a route or error origin) when dealing with an error event, and it contains the name of a transaction when dealing with a transaction event.\r\n\r\nWhile this sounds nice and all, overwriting the name of transactions like this is a bit problematic:\r\n1. It's a bit opaque that this is the behaviour of `Scope.setTransactionName()`\r\n2. Often times we already have a high-quality transaction name through auto-instrumentation (`source: route`) and we don't want to have it overridden by the user. While we should provide users to overwrite high quality transaction names if they really want to, they probably shouldn't do it with `Scope.setTransactionName()`. It's very likely that this function just causes side-effects that the user didn't intend to introduce.\r\n3. If `transaction` is overriden by `Scope.setTransactionName()` we're not updating the `source` of the transaction to `custom`. We need `source` to be correct for Dynamic Sampling. ","author":{"url":"https://github.com/lforst","@type":"Person","name":"lforst"},"datePublished":"2022-08-31T12:53:33Z","url":"https://github.com/getsentry/sentry-javascript/issues/5660"}
| 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:d6383749-9e29-4906-7bc6-b2349e68baaf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 960E:176DDE:5920B7:78E965:6B043FB8 |
| html-safe-nonce | 096e734a54977f768deb343da83019c792243650deef13c1cb903197da181fb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjBFOjE3NkRERTo1OTIwQjc6NzhFOTY1OjZCMDQzRkI4IiwidmlzaXRvcl9pZCI6IjIyNDk5MDE4MDkzMDMwNDQwMjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 66c020514c58d289a35f69fc5afe2e38c4d0dab36bbfea622b7b99678493afc1 |
| hovercard-subject-tag | issue:1357295211 |
| 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/5660/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d826da200ab481a2a391c98388e762e52239c3cec916760f357afaa174c12448/getsentry/sentry-javascript/issues/5660 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d826da200ab481a2a391c98388e762e52239c3cec916760f357afaa174c12448/getsentry/sentry-javascript/issues/5660 |
| og:image:alt | We've identified this API, or rather its implementation as problematic. Scope.setTransactionName() will populate the transaction field of any event that comes after that call on that scope (and any... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lforst |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| 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 | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| 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