Title: Sentry.Handlers.requestHandler migration steps required? · Issue #5282 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sentry.Handlers.requestHandler migration steps required? · Issue #5282 · getsentry/sentry-javascript
X Title: Sentry.Handlers.requestHandler migration steps required? · Issue #5282 · 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/5282
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry.Handlers.requestHandler migration steps required?","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\nSelf-hosted/on-premise\n\n### Which package are you using?\n\n@sentry/node\n\n### SDK Version\n\n7.2.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### Steps to Reproduce\n\nAccording to https://docs.sentry.io/platforms/node/guides/express/ and other docs,\r\nwe have this in our code base:\r\n```\r\napp.use(\r\n\tSentry.Handlers.requestHandler({\r\n\t\tuser: ['_id', 'source'],\r\n\t\trequest: true,\r\n\t\tserverName: true,\r\n\t\tversion: true\r\n\t})\r\n);\r\n```\r\n\r\nbut since the latest refactorings (https://github.com/getsentry/sentry-javascript/commit/d69cafce8f208b2816c2b41f943ed3ee9e7cf2af) this does not compile anymore, we get the following error:\r\n\r\n`TS2345: Argument of type '{ user: string[]; request: boolean; serverName: boolean; version: boolean; }' is not assignable to parameter of type 'RequestHandlerOptions'. Object literal may only specify known properties, and 'user' does not exist in type 'RequestHandlerOptions'.`\r\n\r\nI looked into RequestHandlerOptions and found there a new child called \"include\":\r\n\r\nShould I move user + request inside of include, and if yes, what happened to serverName and version, where can I specify them now?\n\n### Expected Result\n\nEither a mirgation guide or it should work as before ;)\n\n### Actual Result\n\nlatest 7.2.0 is not compilable with config parameters for requestHandler","author":{"url":"https://github.com/simllll","@type":"Person","name":"simllll"},"datePublished":"2022-06-20T09:17:28Z","url":"https://github.com/getsentry/sentry-javascript/issues/5282"}
| 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:22a1d8fd-33a6-8d8a-13b2-a01f20d150ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D628:8181B:C918B:11B869:6B0463CD |
| html-safe-nonce | 50f6db21a06ecdac6eecc8fe13507d7248086fdc14226ac4851facf111656cd9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjI4OjgxODFCOkM5MThCOjExQjg2OTo2QjA0NjNDRCIsInZpc2l0b3JfaWQiOiIzMjY1NjYzMzU3MjE4NDgxMTAxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f1b43ddd6fb920295d1359faef79cf4eb7c1a2b898ba3fa98bfc986434bcb654 |
| hovercard-subject-tag | issue:1276621545 |
| 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/5282/issue_layout |
| twitter:image | https://opengraph.githubassets.com/420745f2bd7f415433e7e1557631c70d57c20fcff1a9ce118af444a838373742/getsentry/sentry-javascript/issues/5282 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/420745f2bd7f415433e7e1557631c70d57c20fcff1a9ce118af444a838373742/getsentry/sentry-javascript/issues/5282 |
| 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 | simllll |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| 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 | 03e114520787ad27289207f153520ef97461127c |
| 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