Title: Support WASM modules instantiated in web workers · Issue #18779 · getsentry/sentry-javascript · GitHub
Open Graph Title: Support WASM modules instantiated in web workers · Issue #18779 · getsentry/sentry-javascript
X Title: Support WASM modules instantiated in web workers · Issue #18779 · getsentry/sentry-javascript
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 imag...
Open Graph 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 f...
X 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: WA...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/18779
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support WASM modules instantiated in web workers","articleBody":"### Problem Statement\n\n The [wasmIntegration](https://docs.sentry.io/platforms/javascript/guides/wasm) currently only supports WASM modules instantiated on the main thread. When WASM is instantiated inside a web worker, the integration doesn't fully work:\n\n- WASM frames are not symbolicated\n- No debug images attached to `event.debug_meta.images`\n- `applicationKey` for third-party filtering doesn't apply to WASM frames\n\nThis is because:\n\n1. [patchWebAssembly()](https://github.com/getsentry/sentry-javascript/blob/develop/packages/wasm/src/patchWebAssembly.ts) only patches the main thread's WebAssembly object - workers have their own global scope\n2. The [IMAGES](https://github.com/getsentry/sentry-javascript/blob/cc93c682f133eb401c1576d5d56c2539960440e1/packages/wasm/src/registry.ts#L3) registry, that stores WASM debug info, is module-scoped with no mechanism to forward it to the main thread\n3. [registerWebWorker()](https://github.com/getsentry/sentry-javascript/blob/cc93c682f133eb401c1576d5d56c2539960440e1/packages/browser/src/integrations/webWorker.ts#L234) doesn't collect or forward WASM module registration data to the main-thread\n\n### Solution Brainstorm\n\nAdd a `registerWebWorkerWasm()` function to `@sentry/wasm` that users call in their worker:\n\nMain-thread setup:\n```js\nimport * as Sentry from \"@sentry/browser\";\nimport { wasmIntegration } from \"@sentry/wasm\";\n\nSentry.init({ \n dsn: '...',\n integrations: [\n wasmIntegration(),\n ],\n});\n\nconst worker = new Worker(\"worker.js\");\n\nSentry.addIntegration(Sentry.webWorkerIntegration({ worker }));\n```\n\nWorker setup:\n\n```js\n\n// proposed new api `registerWebWorkerWasm` api\n\nimport { registerWebWorkerWasm } from \"@sentry/wasm\"; \nregisterWebWorkerWasm({ self }); \n```\n\nThis 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.\n\nThe 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`\n\nThen the wasm integration's [processEvent()](https://github.com/getsentry/sentry-javascript/blob/3ff89c6270b8cc3ae3748d67c8c09d03f7502773/packages/wasm/src/index.ts#L23) will use these stored images from the worker.\n\nThis approach mirrors how we do things in workers for debugIds and moduleMetadata.\n\n### Additional Context\n\nDiscussions: #18766, #18705\n\n### Priority\n\n\u003csub>React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.\u003c/sub>","author":{"url":"https://github.com/andreiborza","@type":"Person","name":"andreiborza"},"datePublished":"2026-01-12T12:27:41Z","url":"https://github.com/getsentry/sentry-javascript/issues/18779"}
| 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:c0998885-3e93-b493-7944-d21376010baa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CA8:32230E:48D3FE:636574:6B04BFE5 |
| html-safe-nonce | f526e86b922961d8be9f3dada86e7c6298ed610848ebe87b9a2e460095040372 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0E4OjMyMjMwRTo0OEQzRkU6NjM2NTc0OjZCMDRCRkU1IiwidmlzaXRvcl9pZCI6IjQyODA5MTg5OTEzMjU1OTMzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8926a10f03a95b0abff575c1a12ccd983f3a3968fa9e8288b0453436013b16ff |
| hovercard-subject-tag | issue:3804112112 |
| 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/18779/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ea75095e02082c67a04c4c0b303d6af8a170a779ea5c7d8384eb2c84eef428ab/getsentry/sentry-javascript/issues/18779 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ea75095e02082c67a04c4c0b303d6af8a170a779ea5c7d8384eb2c84eef428ab/getsentry/sentry-javascript/issues/18779 |
| og:image:alt | 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 f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andreiborza |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| 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 | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| 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