Skip to content

feat(cloudflare): Auto-instrument Workflow classes#22442

Draft
JPeer264 wants to merge 1 commit into
jp/cloudflare-auto-instrument-durableobjectfrom
jp/cloudflare-auto-instrument-workflow
Draft

feat(cloudflare): Auto-instrument Workflow classes#22442
JPeer264 wants to merge 1 commit into
jp/cloudflare-auto-instrument-durableobjectfrom
jp/cloudflare-auto-instrument-workflow

Conversation

@JPeer264

Copy link
Copy Markdown
Member

Extend the Vite auto-instrument plugin to wrap exported Cloudflare Workflow classes with instrumentWorkflowWithSentry, mirroring the existing Durable Object support. Workflow class names are read from the workflows[] section of the wrangler config (skipping bindings with a script_name, which live in another worker), and fed into the transform's class-wrapper map.

Durable Object and Workflow bindings share the same shape and skip/dedup rules, so the extraction is a single collectClassBindings helper.

Adds a vite-autoinstrument/workflow integration suite that builds an unwrapped Workflow class via the Vite plugin and asserts the workflow-step transaction.

The majority of the additions are tests.

@JPeer264 JPeer264 self-assigned this Jul 21, 2026
Extend the Vite auto-instrument plugin to wrap exported Cloudflare Workflow
classes with `instrumentWorkflowWithSentry`, mirroring the existing Durable
Object support. Workflow class names are read from the `workflows[]` section of
the wrangler config (skipping bindings with a `script_name`, which live in
another worker), and fed into the transform's class-wrapper map.

Durable Object and Workflow bindings share the same shape and skip/dedup rules,
so the extraction is a single `collectClassBindings` helper.

Adds a `vite-autoinstrument/workflow` integration suite that builds an unwrapped
Workflow class via the Vite plugin and asserts the workflow-step transaction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/cloudflare-auto-instrument-durableobject branch from 1d8ee57 to 6fd1b77 Compare July 21, 2026 15:25
@JPeer264
JPeer264 force-pushed the jp/cloudflare-auto-instrument-workflow branch from 6938355 to ba5f3e5 Compare July 21, 2026 15:25
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.

1 participant