Title: Incorrect documentation for Sentry.registerWebWorker() · Issue #17443 · getsentry/sentry-javascript · GitHub
Open Graph Title: Incorrect documentation for Sentry.registerWebWorker() · Issue #17443 · getsentry/sentry-javascript
X Title: Incorrect documentation for Sentry.registerWebWorker() · Issue #17443 · 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/17443
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect documentation for Sentry.registerWebWorker()","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/browser\n\n### SDK Version\n\n10.5.0\n\n### Framework Version\n\n_No response_\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n#16981 added [`Sentry.registerWebWorker()`](https://github.com/getsentry/sentry-javascript/blob/577fbefaa0cc700ca25dc780d39584a04f14b087/packages/browser/src/integrations/webWorker.ts#L136-L141). However, the [documentation][1] [repeatedly][2] [refers to it][3] as `Sentry.registerWorker()`, which doesn't seem to exist. So do [some comments][4] [in the code][5].\n\n[1]: https://docs.sentry.io/platforms/javascript/best-practices/web-workers/#:~:text=posting%20any%20message-,Sentry.registerWorker,-(%7B%20self\n[2]: https://docs.sentry.io/platforms/javascript/best-practices/web-workers/#:~:text=Every%20worker%20must%20call%20Sentry.registerWorker(%7B%20self%20%7D)%20to%20register%20itself%20with%20the%20SDK.\n[3]: https://docs.sentry.io/platforms/javascript/best-practices/web-workers/#:~:text=Likewise%2C%20don%27t%20use%20the%20Sentry.registerWorker%20in%20the%20worker.\n[4]: https://github.com/getsentry/sentry-javascript/blob/577fbefaa0cc700ca25dc780d39584a04f14b087/packages/browser/src/integrations/webWorker.ts#L28\n[5]: https://github.com/getsentry/sentry-javascript/blob/577fbefaa0cc700ca25dc780d39584a04f14b087/packages/browser/src/integrations/webWorker.ts#L128\n\n\n\n### Steps to Reproduce\n\n1. `npm install --save @sentry/browser@10.5.0`\n2. Create service-worker.ts:\n ```typescript\n import * as Sentry from \"@sentry/browser\";\n Sentry.registerWorker({ self });\n ```\n3. Attempt to compile it with tsc\n\n### Expected Result\n\nNo errors\n\n### Actual Result\n\n```\nTS2551: Property 'registerWorker' does not exist on type \n'typeof import(\".../node_modules/@sentry/browser/build/npm/types/index\")'.\nDid you mean 'registerWebWorker'?\n```\n\nThe answer to \"Did you mean 'registerWebWorker'?\" is *yes*. But that's not what's documented.\n\n\n\u003cimg width=\"579\" height=\"179\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/f052ce4d-e5dd-480d-ba54-3305c102b526\" />\n","author":{"url":"https://github.com/medmunds","@type":"Person","name":"medmunds"},"datePublished":"2025-08-22T17:49:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/17443"}
| 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:8fd8e500-163f-1988-ce55-91d01735ea55 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7FA:334801:1E3D275:29AE5A4:6B05A0F7 |
| html-safe-nonce | 9e6b50514fc438ab3a97830f484b818a1bf25fd2c0f3e0652ae9b1898860457a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0ZBOjMzNDgwMToxRTNEMjc1OjI5QUU1QTQ6NkIwNUEwRjciLCJ2aXNpdG9yX2lkIjoiMjU0MDgzODc4MzY1MDQ3MjE4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8b9408e675b700c529c66de4b4d085de1f1d904c6ce3872a23f3090f78c72875 |
| hovercard-subject-tag | issue:3346203238 |
| 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/17443/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7dc59fb086301e232f1327151907c26b4d9a3f9efca615c3560df941f60efcd0/getsentry/sentry-javascript/issues/17443 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7dc59fb086301e232f1327151907c26b4d9a3f9efca615c3560df941f60efcd0/getsentry/sentry-javascript/issues/17443 |
| 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 | medmunds |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1fb3ddc0b71892c329818732762bc26c09d4e193a34ef934888d4731e69c0173 |
| 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 | 001eaa59a2e6bac6dc88d27c00f0240847562453 |
| 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