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
I have a browser app that loads wasm from within a web worker. I'm currently setting up @sentry/wasm's wasmIntegration and Sentry.webWorkerIntegration in the main thread, and calling Sentry.registerWebWorker in the worker thread.
The question is, does the wasmIntegration belong in the main thread, the worker thread, or both? Sentry's docs "Ask AI" was confident it was only needed in the main thread, where error stack frames are parsed. But it looks like wasmIntegration also patches WebAssembly methods, which would need to be in the worker where they're used.
Here's what I'm doing now (roughly):
// main threadimport*asSentryfrom"@sentry/browser";import{wasmIntegration}from"@sentry/wasm";constwebWorkerIntegration=Sentry.webWorkerIntegration({worker: []});Sentry.init({// ...integrations: [wasmIntegration(),webWorkerIntegration],});constworker=newWorker(...);webWorkerIntegration.addWorker(worker);// worker threadimport*asSentryfrom"@sentry/browser";Sentry.registerWebWorker({ self });WebAssembly.instantiateStreaming(fetch(...));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a browser app that loads wasm from within a web worker. I'm currently setting up @sentry/wasm's wasmIntegration and Sentry.webWorkerIntegration in the main thread, and calling Sentry.registerWebWorker in the worker thread.
The question is, does the wasmIntegration belong in the main thread, the worker thread, or both? Sentry's docs "Ask AI" was confident it was only needed in the main thread, where error stack frames are parsed. But it looks like wasmIntegration also patches WebAssembly methods, which would need to be in the worker where they're used.
Here's what I'm doing now (roughly):
Beta Was this translation helpful? Give feedback.
All reactions