Skip to content

feat(deno)!: Align remaining denoHttpIntegration options with httpIntegration - #23692

Open
RulaKhaled wants to merge 3 commits into
developfrom
rolaabuhasna/js-3393-align-remaining-denohttp-options
Open

feat(deno)!: Align remaining denoHttpIntegration options with httpIntegration#23692
RulaKhaled wants to merge 3 commits into
developfrom
rolaabuhasna/js-3393-align-remaining-denohttp-options

Conversation

@RulaKhaled

@RulaKhaled RulaKhaled commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

关注-up to #23313, which aligned most of denoHttpIntegration's option names with httpIntegration.

Outgoing request hooks

outgoingRequestHook, outgoingResponseHook and outgoingRequestApplyCustomAttributes are now declared on denoHttpIntegration. Core already invoked all three and Deno already spread its options through, so they fired at runtime and were only unreachable from TypeScript. The last one maps to core's applyCustomAttributesOnSpan, the same way tracePropagation maps to core's option name.

ignoreStatusCodes

This was declared on the shared HttpInstrumentationOptions contract but read by nobody in core — only Node implemented it, in its own processEvent. The filtering helper and default list now live in @sentry/core, Node uses them instead of its private copy, and denoHttpIntegration gained a processEvent that applies them.

Behavior change: With traceLifecycle: 'static', Deno now drops server transactions with status codes in [[401, 404], [301, 303], [305, 399]] by default. That is the server-SDK default for traceIgnoreStatusCodes: incoming requests that are useless for debugging (bot 404s, unhelpful redirects) should not consume span quota. Node already used this list; Bun gets it via httpIntegration.

The filter runs in processEvent on transaction events. The default 'stream' lifecycle does not produce those events, so typical Deno apps are unaffected — the same limitation Node already has.

Since denoHttpIntegration is a default integration and filters on the finished transaction rather than on its origin, this covers Deno.serve transactions too (when transaction events are produced). Pass ignoreStatusCodes: [] to keep everything. Documented in MIGRATION.md.

Kept transactions now also carry the HTTP status in the top-level response context, as in Node.

Closes #23481

@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

JS-3393

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.56 kB -4.27% -1.27 kB 🔽
@sentry/browser - with treeshaking flags 26.92 kB -3.95% -1.11 kB 🔽
@sentry/browser (incl. Tracing) 48.64 kB +2.95% +1.39 kB 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.65 kB +2.91% +1.37 kB 🔺
@sentry/browser (incl. Tracing, Profiling) 51.56 kB -0.85% -438 B 🔽
@sentry/browser (incl. Tracing, Replay) 88.09 kB +1.74% +1.5 kB 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.52 kB +2% +1.52 kB 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 92.79 kB +1.66% +1.51 kB 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 105.74 kB +1.73% +1.79 kB 🔺
@sentry/browser (incl. Feedback) 46.05 kB -2.31% -1.09 kB 🔽
@sentry/browser (incl. sendFeedback) 33.62 kB -3.02% -1.04 kB 🔽
@sentry/browser (incl. FeedbackAsync) 38.73 kB -2.64% -1.05 kB 🔽
@sentry/browser (incl. Metrics) 29.51 kB -4.53% -1.4 kB 🔽
@sentry/browser (incl. Logs) 29.8 kB -4.32% -1.34 kB 🔽
@sentry/browser (incl. Metrics & Logs) 30.43 kB -4.35% -1.38 kB 🔽
@sentry/react 30.3 kB -4.19% -1.32 kB 🔽
@sentry/react (incl. Tracing) 50.84 kB +2.68% +1.33 kB 🔺
@sentry/vue 35.69 kB +2.2% +767 B 🔺
@sentry/vue (incl. Tracing) 50.87 kB +3.32% +1.63 kB 🔺
@sentry/svelte 28.59 kB -4.25% -1.27 kB 🔽
CDN Bundle 30.35 kB -4.79% -1.52 kB 🔽
CDN Bundle (incl. Tracing) 49.25 kB +3.6% +1.71 kB 🔺
CDN Bundle (incl. Logs, Metrics) 32.58 kB -2.5% -834 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) 51.15 kB +4.5% +2.2 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.17 kB +0.59% +425 B 🔺
CDN Bundle (incl. Tracing, Replay) 86.74 kB +1.83% +1.55 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.62 kB +2.45% +2.12 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 92.63 kB +1.79% +1.62 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.52 kB +2.4% +2.21 kB 🔺
CDN Bundle - uncompressed 89.95 kB -4.94% -4.67 kB 🔽
CDN Bundle (incl. Tracing) - uncompressed 146.85 kB +3.33% +4.73 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 96.24 kB -3.02% -3 kB 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.54 kB +4.41% +6.44 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.41 kB +0.66% +1.47 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.34 kB +1.91% +4.97 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 272.02 kB +2.52% +6.68 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 280.05 kB +1.81% +4.96 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.71 kB +2.4% +6.67 kB 🔺
@sentry/nextjs (client) 53.42 kB +2.58% +1.34 kB 🔺
@sentry/sveltekit (client) 49.08 kB +2.87% +1.37 kB 🔺
@sentry/core/server 65.38 kB -0.23% -145 B 🔽
@sentry/core/browser 51.84 kB -0.09% -46 B 🔽
@sentry/node 122.83 kB +2.17% +2.6 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.23 kB added added
@sentry/node - without tracing 87.76 kB +4.87% +4.07 kB 🔺
@sentry/aws-serverless 95.93 kB +3.88% +3.58 kB 🔺
@sentry/cloudflare (withSentry) - minified 199.83 kB -8.61% -18.82 kB 🔽
@sentry/cloudflare (withSentry) 496.91 kB -7.79% -41.94 kB 🔽
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB added added
@sentry/node - without channel injection 102.5 kB added added

View base workflow run

@RulaKhaled
RulaKhaled requested a review from isaacs August 27, 2026 16:27

return {
name: INTEGRATION_NAME,
processEvent(event: Event): Event | null {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The filter is processEvent on the finished transaction, not which integration created the span. So on Deno this also drops Deno.serve 404s/3xx, not only node:http. Same side effect Bun already has.

Are we good applying that Node default to Deno including Deno.serve (align with Node/Bun/spec), or should WinterCG handlers stay unfiltered?

RulaKhaled and others added 2 commits August 28, 2026 14:44
…egration

关注-up to #23313. Declares the outgoing request hooks on
denoHttpIntegration, and makes `ignoreStatusCodes` actually take effect
there by sharing the status-code filtering with Node via @sentry/core.
Keep shouldFilterStatusCode private to the module, and document that Deno's
status-code filter runs on the finished transaction, including Deno.serve.

Co-Authored-By: Cursor Grok 4.6 <cursoragent@cursor.com>
@RulaKhaled
RulaKhaled force-pushed the rolaabuhasna/js-3393-align-remaining-denohttp-options branch from 2c0c440 to a380532 比较 August 28, 2026 12:45
@RulaKhaled
RulaKhaled marked this pull request as ready for review August 28, 2026 13:02
@RulaKhaled
RulaKhaled requested review from a team as code owners August 28, 2026 13:02
@RulaKhaled
RulaKhaled requested review from andreiborza and removed request for a team August 28, 2026 13:02

@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.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a380532. Configure here.

Comment thread packages/deno/src/integrations/http.ts
Comment thread packages/deno/test/deno-http-outgoing-hooks.test.ts Outdated
The filter only runs on transaction events, so MIGRATION.md and the Deno
JSDoc should say so. Also wait for the parent transaction in the
outgoing-hooks test instead of racing beforeSendTransaction.

Co-Authored-By: Cursor <cursoragent@cursor.com>
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

Align remaining denoHttpIntegration options with httpIntegration

1 participant