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): Guard against invalid maxSpanWaitDuration values #14632

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 10, 2024

Today, if you pass e.g. Infinity or another large number to maxSpanWaitDuration, the SDK will error out because we try to do new Array(maxSpanWaitDuration), which is impossible.

Ideally, we can properly allow an infinite wait time, but for now this adds checks to ensure only valid values are passed in there, and we do not explode.

See #14154 (comment)

@mydea mydea requested a review from lforst December 10, 2024 08:14
@mydea mydea self-assigned this Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.27 KB - -
@sentry/browser - with treeshaking flags 21.94 KB - -
@sentry/browser (incl. Tracing) 35.75 KB - -
@sentry/browser (incl. Tracing, Replay) 72.98 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.38 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 77.29 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.78 KB - -
@sentry/browser (incl. Feedback) 40.02 KB - -
@sentry/browser (incl. sendFeedback) 27.88 KB - -
@sentry/browser (incl. FeedbackAsync) 32.67 KB - -
@sentry/react 25.94 KB - -
@sentry/react (incl. Tracing) 38.58 KB - -
@sentry/vue 27.47 KB - -
@sentry/vue (incl. Tracing) 37.59 KB - -
@sentry/svelte 23.43 KB - -
CDN Bundle 24.41 KB - -
CDN Bundle (incl. Tracing) 37.4 KB - -
CDN Bundle (incl. Tracing, Replay) 72.6 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.96 KB - -
CDN Bundle - uncompressed 71.69 KB - -
CDN Bundle (incl. Tracing) - uncompressed 110.97 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 225.04 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 238.26 KB - -
@sentry/nextjs (client) 38.86 KB - -
@sentry/sveltekit (client) 36.26 KB - -
@sentry/node 162.34 KB +0.07% +116 B 🔺
@sentry/node - without tracing 98.53 KB +0.11% +110 B 🔺
@sentry/aws-serverless 126.23 KB +0.1% +125 B 🔺

View base workflow run

@mydea mydea force-pushed the fn/max-maxSpanWaitDuration branch from 3a5bee0 to 41db465 Compare December 10, 2024 08:39
@mydea mydea enabled auto-merge (squash) December 10, 2024 09:37
@mydea mydea merged commit a9cfd11 into develop Dec 10, 2024
113 checks passed
@mydea mydea deleted the fn/max-maxSpanWaitDuration branch December 10, 2024 09:49
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