Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(browser-integration): Add sentry DSN route handler by default #14095

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Oct 28, 2024

Instead of sprinkling this through tests, we can just generally handle this route, streamlining tests a bit and avoid unexpected errors/console warnings messing with things.

So this PR basically inverses this - by default, we add a "success" route handler for the Sentry DSN, and if you want to have special handling you can opt-out of this.

Supersedes https://github.com/getsentry/sentry-javascript/pull/14092/files

Instead of sprinkling this through tests, we can just generally handle this route, streamlining tests a bit and avoid unexpected errors/console warnings messing with things.
@mydea mydea self-assigned this Oct 28, 2024
Copy link

codecov bot commented Oct 28, 2024

❌ 7 Tests Failed:

Tests completed Failed Passed Skipped
636 7 629 34
View the top 3 failed tests by shortest run time
replay/errors/errorNotSent/test.ts [error-mode] should handle errors that result in API error response
Stack Traces | 0.339s run time
test.ts:6:11 [error-mode] should handle errors that result in API error response
replay/errorResponse/test.ts should stop recording after receiving an error response
Stack Traces | 0.421s run time
test.ts:11:11 should stop recording after receiving an error response
replay/errors/errorMode/test.ts [error-mode] should start recording and switch to session mode once an error is thrown
Stack Traces | 1.21s run time
test.ts:18:11 [error-mode] should start recording and switch to session mode once an error is thrown

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 22.74 KB +0.05% +10 B 🔺
@sentry/browser - with treeshaking flags 21.53 KB +0.04% +8 B 🔺
@sentry/browser (incl. Tracing) 35.12 KB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Replay) 71.85 KB +0.1% +67 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.25 KB +0.01% +4 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.21 KB +0.12% +89 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.99 KB +0.07% +60 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.81 KB +0.06% +52 B 🔺
@sentry/browser (incl. metrics) 26.98 KB +0.03% +7 B 🔺
@sentry/browser (incl. Feedback) 39.88 KB +0.04% +13 B 🔺
@sentry/browser (incl. sendFeedback) 27.38 KB +0.04% +9 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.17 KB +0.04% +10 B 🔺
@sentry/react 25.49 KB +0.05% +11 B 🔺
@sentry/react (incl. Tracing) 38.07 KB +0.01% +2 B 🔺
@sentry/vue 26.88 KB +0.03% +7 B 🔺
@sentry/vue (incl. Tracing) 37 KB +0.03% +9 B 🔺
@sentry/svelte 22.87 KB +0.04% +8 B 🔺
CDN Bundle 24.11 KB +0.12% +28 B 🔺
CDN Bundle (incl. Tracing) 36.95 KB +0.06% +22 B 🔺
CDN Bundle (incl. Tracing, Replay) 71.64 KB +0.09% +63 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 76.98 KB +0.09% +66 B 🔺
CDN Bundle - uncompressed 70.7 KB +0.12% +84 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 109.68 KB +0.07% +69 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.21 KB +0.08% +172 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.42 KB +0.08% +172 B 🔺
@sentry/nextjs (client) 38.16 KB +0.04% +15 B 🔺
@sentry/sveltekit (client) 35.72 KB +0.02% +7 B 🔺
@sentry/node 124.95 KB -3.36% -4.34 KB 🔽
@sentry/node - without tracing 94.02 KB -0.01% -4 B 🔽
@sentry/aws-serverless 103.62 KB -1.23% -1.28 KB 🔽

View base workflow run

@mydea mydea marked this pull request as ready for review October 29, 2024 07:52
@mydea mydea requested a review from a team as a code owner October 29, 2024 07:52
@mydea mydea requested review from Lms24 and chargome October 29, 2024 07:53
@mydea mydea merged commit 9e676e0 into develop Oct 29, 2024
151 checks passed
@mydea mydea deleted the fn/resolve-sentry-default branch October 29, 2024 08:08
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.

2 participants