Skip to content

feat(cloudflare): Auto instrument D1 based on env#21276

Draft
JPeer264 wants to merge 1 commit into
developfrom
jp/deprecate-d1-instrument-via-env
Draft

feat(cloudflare): Auto instrument D1 based on env#21276
JPeer264 wants to merge 1 commit into
developfrom
jp/deprecate-d1-instrument-via-env

Conversation

@JPeer264
Copy link
Copy Markdown
Member

@JPeer264 JPeer264 commented Jun 2, 2026

closes #20862
closes JS-2462

Deprecate instrumentD1WithSentry in favor of automatic D1 instrumentation via instrumentEnv. Add isD1Database duck-type check and instrumentD1 with ensureInstrumented to prevent double instrumentation.


The original ticket also states the following, which is outsourced into its own ticket:

batch, exec and withSession are not instrumented.

Deprecate `instrumentD1WithSentry` in favor of automatic D1
instrumentation via `instrumentEnv`. Add `isD1Database` duck-type
check and `instrumentD1` with `ensureInstrumented` to prevent
double instrumentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JPeer264 JPeer264 self-assigned this Jun 2, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 2, 2026

JS-2462

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.2 kB - -
@sentry/browser - with treeshaking flags 25.65 kB - -
@sentry/browser (incl. Tracing) 45.25 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.47 kB - -
@sentry/browser (incl. Tracing, Profiling) 50.24 kB - -
@sentry/browser (incl. Tracing, Replay) 84.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.4 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.54 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.16 kB - -
@sentry/browser (incl. Feedback) 44.36 kB - -
@sentry/browser (incl. sendFeedback) 32.02 kB - -
@sentry/browser (incl. FeedbackAsync) 37.11 kB - -
@sentry/browser (incl. Metrics) 28.27 kB - -
@sentry/browser (incl. Logs) 28.51 kB - -
@sentry/browser (incl. Metrics & Logs) 29.22 kB - -
@sentry/react 29.03 kB - -
@sentry/react (incl. Tracing) 47.52 kB - -
@sentry/vue 32.22 kB - -
@sentry/vue (incl. Tracing) 47.16 kB - -
@sentry/svelte 27.23 kB - -
CDN Bundle 29.57 kB - -
CDN Bundle (incl. Tracing) 47.81 kB - -
CDN Bundle (incl. Logs, Metrics) 31.08 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.34 kB - -
CDN Bundle (incl. Tracing, Replay) 85.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.35 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.05 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.2 kB - -
CDN Bundle - uncompressed 87.7 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.11 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.19 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.87 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.91 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.88 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.63 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.58 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.32 kB - -
@sentry/nextjs (client) 50.04 kB - -
@sentry/sveltekit (client) 45.7 kB - -
@sentry/core/server 75.94 kB - -
@sentry/core/browser 63.09 kB - -
@sentry/node-core 61.69 kB - -
@sentry/node 130.4 kB -0.01% -1 B 🔽
@sentry/node - without tracing 74.06 kB -0.01% -1 B 🔽
@sentry/aws-serverless 86.26 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 173.23 kB +1.02% +1.74 kB 🔺
@sentry/cloudflare (withSentry) 432.75 kB +0.97% +4.12 kB 🔺

View base workflow run

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.

Deprecate instrumentD1WithSentry and instrument via ENV variables

1 participant