Skip to content

Drop platform resets reported by the Durable Object instrumentation - #1796

Merged
RhysSullivan merged 1 commit into
mainfrom
fix/do-instrumentation-reset-noise
Aug 28, 2026
Merged

Drop platform resets reported by the Durable Object instrumentation#1796
RhysSullivan merged 1 commit into
mainfrom
fix/do-instrumentation-reset-noise

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Problem

Every deploy files a small burst of error reports that mean nothing. The Cloudflare runtime resets every live Durable Object when a new script rolls out, and the Sentry DO instrumentation (instrumentDurableObjectWithSentry) captures that reset from inside the object being torn down, with mechanism auto.faas.cloudflare.durable_object and the runtime's message "Durable Object reset because its code was updated."

The capture-owner scheme cannot reach these. It drops the instrumentation's echo only when a worker seam classified the failure, answered the client and claimed the cause — and inside a dying object there is no seam and no request to claim it. The client-facing half is already handled: the in-flight request fails at the worker seam and is rendered there as a retryable 503.

Fix

The cloud beforeSend now drops an event when both hold:

  • the mechanism is the DO instrumentation's, so a reset message arriving by any other path (an ordinary worker capture, the DO's own capture seam) is untouched;
  • the exception message classifies as a transient platform failure through the existing shared classifyDurableObjectError, so this can never recognize a different set of messages than the worker seams do.

Everything the classifier does not recognize is kept, so a real defect thrown inside a DO — an alarm crash, a broken handler, the memory-limit reset the classifier deliberately excludes — still reports. session_dead is also kept: that disposition means our own code called ctx.abort, which is the application acting, not the platform. Worker-seam behaviour is unchanged.

Testing

Unit tests in the cloud observability suite: a code-update reset with the DO instrumentation mechanism is dropped (as are the other transient kinds the classifier knows), the same message on a non-DO mechanism is kept, and an unclassified DO-side failure is kept. One existing case that used the reset message to stand for "unclaimed DO failure" now uses a real defect message, which is what it was there to express.

This layer is unreachable black-box: the dropped event and the events kept beside it declare the same exception type and shape, and only the mechanism the Sentry SDK stamps separates them, so unit tests over the hook are the only place it can be pinned.

Mutation-checked: with the drop neutralized, only the three new drop tests fail.

  • bun run typecheck green
  • apps/cloud observability suite green (19 tests)
  • e2e/cloud/sentry-otel-correlation.test.ts green

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing a175ea6 Commit Preview URL

Branch Preview URL
Aug 28 2026, 01:38 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud a175ea6 Aug 28 2026, 01:40 AM

@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1796

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1796

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1796

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1796

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1796

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1796

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1796

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1796

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1796

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1796

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1796

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1796

executor

npm i https://pkg.pr.new/executor@1796

commit: a175ea6

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 28, 2026 02:46
@RhysSullivan
RhysSullivan merged commit 5a2a247 into main Aug 28, 2026
44 checks passed
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