I have Sentry working with WASM (on Cloudflare workers) with a custom Transport implementation. However, for it to compile with Sentry a few changes had to be made. These are minor changes and I am wondering if you guys are open to accept a PR with these changes. I describe them below.
Replace std::time with web_time
Remove unwrap on SessionFlusher essentially making it fail silently. Threads are not supported in Wasm and the flushing mechanism will have to be implemented by the Transport itself. For CloudFlare workers, for example, this is done using wait_until which spawns a child process to send the envelope.
Overall, the changes are minor and can be gated behind a "wasm" feature. Integrations will have to be changed/upgraded individually but this could be a starting point.
I have Sentry working with WASM (on Cloudflare workers) with a custom Transport implementation. However, for it to compile with Sentry a few changes had to be made. These are minor changes and I am wondering if you guys are open to accept a PR with these changes. I describe them below.
std::time
withweb_time
unwrap
onSessionFlusher
essentially making it fail silently. Threads are not supported in Wasm and the flushing mechanism will have to be implemented by the Transport itself. For CloudFlare workers, for example, this is done usingwait_until
which spawns a child process to send the envelope.Overall, the changes are minor and can be gated behind a "wasm" feature. Integrations will have to be changed/upgraded individually but this could be a starting point.