Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented May 16, 2024

Closes #12051

This PR does two things:

  1. Ensures we add helpful attributes to idle spans more consistently. We now add the sentry.idle_span_finish_reason attribute always for idle spans, not only when op == ui.action.click. This should also make it easier to debug stuff etc, and I see no reason to not always set this. Additionally, we also keep the number of spans we discarded (if any) for easier debugging too (as sentry.idle_span_discarded_spans).
  2. We ensure that idle spans cannot exceed the configured finalTimeout. Previously, due to the order of things, it was possible that we ended a span very late, if it had a child span with a very late end timestamp (as we took the last child span timestamp). Possibly this could lead to overly long transactions.

I think 2, combined with the fact that later we do filter out child spans that ended after idle span, lead to the incorrect-length spans.

@mydea mydea requested review from Lms24, andreiborza, lforst and s1gr1d May 16, 2024 08:47
@mydea mydea self-assigned this May 16, 2024
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.

Good catches!

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 21.67 KB (0%)
@sentry/browser (incl. Tracing) 32.75 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing, Replay) 68.09 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.49 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.13 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.14 KB (+0.05% 🔺)
@sentry/browser (incl. Feedback) 37.6 KB (0%)
@sentry/browser (incl. sendFeedback) 26.23 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.6 KB (0%)
@sentry/react 24.36 KB (0%)
@sentry/react (incl. Tracing) 35.71 KB (+0.08% 🔺)
@sentry/vue 25.5 KB (0%)
@sentry/vue (incl. Tracing) 34.54 KB (+0.09% 🔺)
@sentry/svelte 21.8 KB (0%)
CDN Bundle 24.21 KB (0%)
CDN Bundle (incl. Tracing) 34.16 KB (+0.08% 🔺)
CDN Bundle (incl. Tracing, Replay) 67.84 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 72.8 KB (+0.04% 🔺)
CDN Bundle - uncompressed 71.21 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101.31 KB (+0.07% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.93 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 223.23 KB (+0.04% 🔺)
@sentry/nextjs (client) 34.95 KB (+0.09% 🔺)
@sentry/sveltekit (client) 33.31 KB (+0.1% 🔺)
@sentry/node 140.99 KB (0%)
@sentry/aws-serverless 128.03 KB (0%)

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.

Multiple days long transactions that do not have any child spans

2 participants