Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Jun 14, 2024

This adds a new config option for @sentry/node, maxSpanWaitDuration.

By configuring this, you can define how long the SDK waits for a finished spans parent span to be finished before we discard this.

Today, this defaults to 5 min, so if a span is finished and its parent span is not finished within 5 minutes, the child span will be discarded. We do this to avoid memory leaks, as parent spans may be dropped/lost and thus child spans would be kept in memory forever.

However, if you actually have very long running spans, they may be incorrectly dropped due to this. So now, you can configure your SDK to have a longer wait duration.

Fixes #12491

@mydea mydea requested a review from AbhiPrasad June 14, 2024 08:38
@mydea mydea self-assigned this Jun 14, 2024
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.04 KB (0%)
@sentry/browser (incl. Tracing) 33.23 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.95 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.27 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.02 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.17 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.01 KB (0%)
@sentry/browser (incl. metrics) 26.23 KB (0%)
@sentry/browser (incl. Feedback) 38.24 KB (0%)
@sentry/browser (incl. sendFeedback) 26.63 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.18 KB (0%)
@sentry/react 24.81 KB (0%)
@sentry/react (incl. Tracing) 36.27 KB (0%)
@sentry/vue 26.05 KB (0%)
@sentry/vue (incl. Tracing) 35.08 KB (0%)
@sentry/svelte 22.17 KB (0%)
CDN Bundle 23.39 KB (0%)
CDN Bundle (incl. Tracing) 34.91 KB (0%)
CDN Bundle (incl. Tracing, Replay) 69.02 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.15 KB (0%)
CDN Bundle - uncompressed 68.71 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.3 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 213.75 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.21 KB (0%)
@sentry/nextjs (client) 35.63 KB (0%)
@sentry/sveltekit (client) 33.86 KB (0%)
@sentry/node 111.98 KB (+0.03% 🔺)
@sentry/node - without tracing 89.46 KB (+0.04% 🔺)
@sentry/aws-serverless 98.52 KB (+0.04% 🔺)

@AbhiPrasad
Copy link
Member

Needs docs changes too!

@rahul-kumar-saini rahul-kumar-saini mentioned this pull request Jun 14, 2024
3 tasks
@mydea mydea merged commit 1b6c22e into develop Jun 17, 2024
@mydea mydea deleted the fn/maxSpanDuration branch June 17, 2024 11:51
mydea added a commit that referenced this pull request Jun 17, 2024
mydea added a commit that referenced this pull request Jun 18, 2024
Reverts #12492

Instead we'll do
#12510, which
should work much better.
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.

SentrySpanExporter drops child spans if the root operation takes longer than 5 minutes

3 participants