Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Nov 17, 2025

As Deno requires a valid URL when calling new Request, example.com was used but this caused problems.

This PR changes it to a data URL as it does not rely on external dependencies and is a valid URL in Deno.

Fixes: #18218

Previous PR for that: #5630

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Deno Referrer Policy URL Fix

The supportsReferrerPolicy function still uses new Request('_', ...) with an invalid URL, which will fail in Deno for the same reason the PR fixed in _isFetchSupported. Deno requires valid URLs for the Request constructor, so '_' needs to be changed to a valid URL like 'data:,' to maintain consistency with the fix.

packages/core/src/utils/supports.ts#L171-L172

try {
new Request('_', {

Fix in Cursor Fix in Web


@github-actions
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.62 kB -0.06% -14 B 🔽
@sentry/browser - with treeshaking flags 23.13 kB -0.06% -13 B 🔽
@sentry/browser (incl. Tracing) 41.28 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Profiling) 45.56 kB -0.03% -12 B 🔽
@sentry/browser (incl. Tracing, Replay) 79.73 kB -0.02% -15 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 69.44 kB -0.02% -13 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 84.43 kB -0.02% -15 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 96.64 kB -0.02% -13 B 🔽
@sentry/browser (incl. Feedback) 41.29 kB -0.02% -5 B 🔽
@sentry/browser (incl. sendFeedback) 29.29 kB -0.03% -6 B 🔽
@sentry/browser (incl. FeedbackAsync) 34.21 kB -0.02% -6 B 🔽
@sentry/react 26.32 kB -0.05% -12 B 🔽
@sentry/react (incl. Tracing) 43.22 kB -0.03% -11 B 🔽
@sentry/vue 29.11 kB -0.05% -13 B 🔽
@sentry/vue (incl. Tracing) 43.08 kB -0.03% -11 B 🔽
@sentry/svelte 24.64 kB -0.07% -15 B 🔽
CDN Bundle 26.94 kB -0.05% -13 B 🔽
CDN Bundle (incl. Tracing) 41.83 kB -0.04% -13 B 🔽
CDN Bundle (incl. Tracing, Replay) 78.38 kB -0.02% -15 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 83.85 kB -0.01% -2 B 🔽
CDN Bundle - uncompressed 78.92 kB -0.03% -16 B 🔽
CDN Bundle (incl. Tracing) - uncompressed 124.07 kB -0.02% -16 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 240.1 kB -0.01% -16 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 252.87 kB -0.01% -16 B 🔽
@sentry/nextjs (client) 45.37 kB -0.03% -13 B 🔽
@sentry/sveltekit (client) 41.67 kB -0.03% -9 B 🔽
@sentry/node-core 50.91 kB +0.01% +1 B 🔺
@sentry/node 158.1 kB -0.01% -2 B 🔽
@sentry/node - without tracing 92.78 kB +0.01% +1 B 🔺
@sentry/aws-serverless 106.53 kB -0.01% -1 B 🔽

View base workflow run

@github-actions
Copy link
Contributor

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,987 - 8,400 +7%
GET With Sentry 1,382 15% 1,305 +6%
GET With Sentry (error only) 6,123 68% 5,789 +6%
POST Baseline 1,209 - 1,129 +7%
POST With Sentry 516 43% 465 +11%
POST With Sentry (error only) 1,070 89% 1,040 +3%
MYSQL Baseline 3,345 - 3,218 +4%
MYSQL With Sentry 498 15% 410 +21%
MYSQL With Sentry (error only) 2,763 83% 2,581 +7%

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice fix, thanks!

@s1gr1d s1gr1d merged commit fb67650 into develop Nov 17, 2025
195 checks passed
@s1gr1d s1gr1d deleted the sig/fix-fetch-supported branch November 17, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants