You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(js): Fix references of registerWorker to registerWebWorker (#14699)
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
I incorrectly referred to `Sentry.registerWebWorker` by
`Sentry.registerWorker` when reworking our web worker docs in #14395.
Closesgetsentry/sentry-javascript#17443
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## LEGAL BOILERPLATE
<!-- Sentry employees and contractors can delete or ignore this section.
-->
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
- Every worker must call `Sentry.registerWorker({ self })` to register itself with the SDK.
104
+
- Every worker must call `Sentry.registerWebWorker({ self })` to register itself with the SDK.
105
105
- Do not call `Sentry.webWorkerIntegration()` multiple times! This will lead to unexpected behavior.
106
106
107
107
</Alert>
@@ -135,7 +135,7 @@ Other times, if the worker is just part of your application, you likely want to
135
135
<Alertlevel="warning"title="Keep in Mind">
136
136
137
137
If you initialize the SDK in the worker, don't use the `Sentry.webWorkerIntegration` to register the worker.
138
-
Likewise, don't use the `Sentry.registerWorker` in the worker. Both methods are only supposed to be used when relying on the SDK [from the main thread](#recommended-setup).
138
+
Likewise, don't use the `Sentry.registerWebWorker` in the worker. Both methods are only supposed to be used when relying on the SDK [from the main thread](#recommended-setup).
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/webworker.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,14 +21,14 @@ notSupported:
21
21
22
22
_Import name: `Sentry.webWorkerIntegration`_
23
23
24
-
This integration, together with `Sentry.registerWorker()`, establishes communication between the browser's main thread and one or more [WebWorkers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
24
+
This integration, together with `Sentry.registerWebWorker()`, establishes communication between the browser's main thread and one or more [WebWorkers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
25
25
It listens to worker messages from the passed workers and forwards them to the main thread.
26
26
27
27
Read our <PlatformLinkto="/best-practices/web-workers/">Web Worker Guide</PlatformLink> for more information.
28
28
29
29
<Expandabletitle="What does this integration do?">
30
30
31
-
This integration listens to a message sent from the worker when it calls `Sentry.registerWorker({ self })`.
31
+
This integration listens to a message sent from the worker when it calls `Sentry.registerWebWorker({ self })`.
32
32
The purpose is to sync source map information (debugIds) between the main thread and the worker so that worker
33
33
errors caught by the main thread SDK are properly mapped to the worker's source code.
34
34
@@ -41,12 +41,12 @@ errors caught by the main thread SDK are properly mapped to the worker's source
41
41
42
42
_Type: `Worker | Array<Worker>`_
43
43
44
-
The web worker(s) to listen to. Every worker must call `Sentry.registerWorker({ self })` to register itself with the SDK.
44
+
The web worker(s) to listen to. Every worker must call `Sentry.registerWebWorker({ self })` to register itself with the SDK.
45
45
46
46
## Methods
47
47
48
48
### `addWorker(worker: Worker)`
49
49
50
50
Adds a worker to the integration, after the integraion was already initialized and added to the SDK.
51
51
This is useful if you have workers that are initialized at later point in your application's lifecycle.
52
-
Note that every worker must call `Sentry.registerWorker({ self })` to register itself with the SDK.
52
+
Note that every worker must call `Sentry.registerWebWorker({ self })` to register itself with the SDK.
0 commit comments