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

fix(node-experimental): Ignore outgoing Sentry requests #8994

Merged
merged 1 commit into from Sep 11, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 11, 2023

We do filter these out in the span processor, but we can avoid all this work by not even generating OTEL spans at all for outgoing Sentry requests.

@mydea mydea self-assigned this Sep 11, 2023
/**
* Checks whether given host points to Sentry server
*/
function isSentryHost(host: string | undefined): boolean {
Copy link
Member

Choose a reason for hiding this comment

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

we already have something like this in a few places. Maybe we can extract into a function.

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, will move it as a util to @sentry/core (can't be in utils as it needs access to getCurrentHub()!)

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.34 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.29 KB (0%)
@sentry/browser - Webpack (gzipped) 21.89 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.04 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.4 KB (+0.01% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.47 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.29 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 85.82 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 60.67 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.28 KB (-0.01% 🔽)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 75.36 KB (+0.06% 🔺)
@sentry/react - Webpack (gzipped) 21.92 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 93.22 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.85 KB (0%)

@mydea
Copy link
Member Author

mydea commented Sep 11, 2023

Added an isSentryRequestUrl export from @sentry/core which can be reused for this!

@mydea mydea merged commit 9e39717 into develop Sep 11, 2023
40 checks passed
@mydea mydea deleted the fn/ignore-potel-sentry-requests branch September 11, 2023 14:23
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.

None yet

2 participants