Repository navigation
Description
Problem Statement
The wasmIntegration currently only supports WASM modules instantiated on the main thread. When WASM is instantiated inside a web worker, the integration doesn't fully work:
- WASM frames are not symbolicated
- No debug images attached to
event.debug_meta.images applicationKeyfor third-party filtering doesn't apply to WASM frames
This is because:
- patchWebAssembly() only patches the main thread's WebAssembly object - workers have their own global scope
- The IMAGES registry, that stores WASM debug info, is module-scoped with no mechanism to forward it to the main thread
- registerWebWorker() doesn't collect or forward WASM module registration data to the main-thread
Solution Brainstorm
Add a registerWebWorkerWasm() function to @sentry/wasm that users call in their worker:
Main-thread setup:
import * as Sentry from "@sentry/browser";
import { wasmIntegration } from "@sentry/wasm";
Sentry.init({
dsn: '...',
integrations: [
wasmIntegration(),
],
});
const worker = new Worker("worker.js");
Sentry.addIntegration(Sentry.webWorkerIntegration({ worker }));Worker setup:
// proposed new api `registerWebWorkerWasm` api
import { registerWebWorkerWasm } from "@sentry/wasm";
registerWebWorkerWasm({ self }); This patches WebAssembly in the worker and fowards debug images to the mainthread via postMessage the same way we do with debugIds and module metadata. It would also help filtering out third-party errors when passing in an applicationKey to the wasmIntegration in the main-thread. This is already implemented but it needs the debug images forwarded from the worker to make use of it.
The existing webWorkerIntegration would need to listen to and store WASM images on the window the same way we do with debugIds and module metadata, i.e. WINDOW._sentryWasmImages
Then the wasm integration's processEvent() will use these stored images from the worker.
This approach mirrors how we do things in workers for debugIds and moduleMetadata.
Additional Context
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
Activity
linear commentedon Jan 12, 2026
JS-1441
harshit078 commentedon Jan 13, 2026
Hey @andreiborza , If you are not working on this can I take this up and work on it ? Thanks !
andreiborza commentedon Jan 13, 2026
@harshit078 sure, go for it. Let me know if you need any kind of help with it.
harshit078 commentedon Jan 13, 2026
@andreiborza Sure thanks !
feat(wasm): initialised sentryWasmImages for webworkers (getsentry#18812
github-actions commentedon Jan 29, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #18812, which was included in the 10.38.0 release.