Skip to content

Add sentry support#250

Draft
mendess wants to merge 2 commits into
mainfrom
mendess/add-sentry-support
Draft

Add sentry support#250
mendess wants to merge 2 commits into
mainfrom
mendess/add-sentry-support

Conversation

@mendess

@mendess mendess commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Add sentry support to all workers. This requires a bump of the worker version to
support unwinding in wasm

@mendess mendess self-assigned this Jul 7, 2026
@mendess mendess requested review from a team and lbaquerofierro as code owners July 7, 2026 12:04
@mendess mendess marked this pull request as draft July 7, 2026 12:30
dsn.project_id(),
);
let auth = format!(
"Sentry sentry_key={}, sentry_version=7, sentry_client=azul/{}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lukevalenta

Copy link
Copy Markdown
Contributor

Since Bonk seems to be having trouble lately, here's some feedback from a local AI review:

Review summary of PR #250
CI: All three integration jobs are currently failing — not a compile error, but wrangler dev failed to start in time. The wasm build got slower (--panic-unwind, dropping strip = true, worker 0.7→0.8, plus sentry/getrandom deps) and likely blew past the ~60s startup window. Needs confirming whether to bump the timeout or if the build actually hangs.
Bugs / issues found:

  1. Uuid::nil() on all panic events (Medium) — Sentry dedupes by event_id, so every panic sharing the all-zero ID may be dropped after the first. Since panic capture is the headline feature, this undermines it. Fix: derive a getrandom-free varying UUID (hash of message + file:line:col).
  2. Cron handlers don't catch panics (Low–Medium) — the scheduled handlers capture Err but aren't wrapped in catch_unwind_and_flush, so a panic buffers an event that never flushes. Inconsistent with the DO/frontend paths.
  3. witness_worker only partially integrated (Low) — gets --panic-unwind + RefUnwindSafe but no init_sentry/capture wrappers, despite "all workers" in the description.
    Non-blocking: scope tags persist across requests in a DO isolate (use with_scope); DO errors reported at Fatal (defensible); trailing flush skipped on frontend ? error path (matches pre-existing behavior).

@lukevalenta

Copy link
Copy Markdown
Contributor

/bonk review

@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

2 similar comments
@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown

APIError: Invalid Anthropic API Key

github run

@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown

@lukevalenta Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@mendess mendess force-pushed the mendess/add-sentry-support branch from f9487a4 to 9e58411 Compare July 7, 2026 14:25
@mendess mendess force-pushed the mendess/add-sentry-support branch from 9e58411 to c5799e9 Compare July 7, 2026 14:46
@mendess mendess force-pushed the mendess/add-sentry-support branch from c3e207b to f7b4aac Compare July 7, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants