Skip to content

feat(cloudflare): instrument Workers KV bindings - #25488

Open
faizansaiyed123 wants to merge 5 commits into
getsentry:developfrom
faizansaiyed123:feat/cloudflare-kv-instrumentation
Open

faizansaiyed123 wants to merge 5 commits into
getsentry:developfrom
faizansaiyed123:feat/cloudflare-kv-instrumentation

Conversation

@faizansaiyed123

Copy link
Copy Markdown
Contributor

Fixes #24037

Implements the Workers KV portion of #24037.

  • add isKVNamespace detection using get, put, list, and getWithMetadata, excluding JSRPC proxies
  • add KV instrumentation for get, getWithMetadata, put, delete, and list
  • emit cache spans with KV cache/database attributes
  • add unit tests and a Cloudflare integration suite

Vectorize and Analytics Engine remain separate follow-ups.

@faizansaiyed123
faizansaiyed123 requested a review from a team as a code owner October 18, 2026 04:18
@faizansaiyed123
faizansaiyed123 requested review from JPeer264 and mydea and removed request for a team October 18, 2026 04:18
@github-actions github-actions Bot added the external PR from an external contributor label Oct 18, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread packages/cloudflare/src/instrumentations/worker/instrumentKV.ts Outdated
Comment thread packages/cloudflare/test/instrumentations/worker/instrumentKV.test.ts Outdated
Comment thread dev-packages/cloudflare-integration-tests/suites/kv/test.ts
@faizansaiyed123
faizansaiyed123 force-pushed the feat/cloudflare-kv-instrumentation branch from bf253b0 to c23d2c8 Compare October 18, 2026 04:34

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c23d2c8. Configure here.

Comment thread packages/cloudflare/test/instrumentations/instrumentEnv.test.ts Outdated
Comment thread dev-packages/cloudflare-integration-tests/suites/kv/test.ts
@faizansaiyed123

Copy link
Copy Markdown
Contributor Author

Hi @isaacs, following up on our discussion in #24037.

I’ve kept this PR focused on Workers KV as agreed. I also made a small test cleanup and added explicit coverage that cache.key is absent from KV list spans.

Could you please take another look when you have a chance? Thanks for your guidance!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cloudflare: Several common bindings are not instrumented

1 participant