Add sentry support#250
Conversation
| dsn.project_id(), | ||
| ); | ||
| let auth = format!( | ||
| "Sentry sentry_key={}, sentry_version=7, sentry_client=azul/{}", |
There was a problem hiding this comment.
Aside from sentry_client=azul line, it seems like this sentry functionality would be pretty generally useful for Rust-based Workers. Worth considering publishing as a standalone worker-sentry crate, possibly in the https://github.com/cloudflare/workers-rs repo.
|
Since Bonk seems to be having trouble lately, here's some feedback from a local AI review: Review summary of PR #250
|
|
/bonk review |
|
APIError: Invalid Anthropic API Key |
2 similar comments
|
APIError: Invalid Anthropic API Key |
|
APIError: Invalid Anthropic API Key |
|
@lukevalenta Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
c8c8e82 to
b581f55
Compare
Since nightly >=2026-05-09 (rust-lang/rust#156061), wasm targets emit modern exnref exception-handling opcodes by default under -Cpanic=unwind. The wasm-bindgen 0.2.126 CLI bundles wasmparser 0.245.1, which rejects these opcodes with: type mismatch: catch_all_ref label must be a subtype of (ref exn) Work around this by passing -Cllvm-args=-wasm-use-legacy-eh via RUSTFLAGS at every worker-build --panic-unwind invocation site. worker-build reads existing RUSTFLAGS and appends -Cpanic=unwind, so the flag survives into the cargo subprocess. Placing it in .cargo/config.toml would not work: Cargo treats RUSTFLAGS env and target.<triple>.rustflags as mutually exclusive sources, and the env var (always set by worker-build) wins. This can be removed once wasm-bindgen ships a wasmparser that understands exnref (tracked in wasm-bindgen/wasm-bindgen#5219).
witness_worker transitively depends on getrandom 0.3.4 via generic_log_worker -> sentry-core -> rand 0.9 -> rand_core 0.9. Without the wasm_js feature, getrandom 0.3.4 emits a compile_error! on wasm32-unknown-unknown. ct_worker and bootstrap_mtc_worker already carry this dependency for feature unification; witness_worker was missing it.
0460a55 to
5ae3d03
Compare
|
/bonk review |
|
PR #250 – Sentry integration review Findings (ordered by severity)
Overall assessment – The Sentry support is correctly wired across all workers, panic events are uniquely identified, and error handling respects DO isolation semantics. No functional regressions are apparent. The only actionable item is to address the CI timeout (outside the codebase). |
lukevalenta
left a comment
There was a problem hiding this comment.
LGTM. Use of nightly features seems OK.
|
|
||
| # RUSTFLAGS: force legacy Wasm EH so wasm-bindgen 0.2.126's wasmparser | ||
| # accepts the module (modern exnref opcodes from nightly >=2026-05-09 | ||
| # are not yet supported). |
There was a problem hiding this comment.
From the commit message, looks like wasm-bindgen/wasm-bindgen#5219 tracks support being added to wasm-bindgen without the flag? Could you link that here?
Add sentry support to all workers. This requires a bump of the worker version to
support unwinding in wasm