Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(core): Emit client reports for unsampled root spans on span start #14936

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 8, 2025

With this PR, the sample_rate,transaction client report is now consistently emitted at the time when the root span is sampled.

Previously, in Node (OTEL) we did not emit this at all, while in browser we emit it at span end time. This is inconsistent and not ideal. Emitting it in OTEL at span end time is difficult because span.end() is a no-op there and you do not get access to it anywhere. So doing it at span start (=sample time) is easier, and also makes more sense as this is also actually the time when the span is dropped.

@mydea mydea requested review from lforst and Lms24 January 8, 2025 11:19
@mydea mydea self-assigned this Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.74 KB - -
@sentry/browser - with treeshaking flags 21.51 KB - -
@sentry/browser (incl. Tracing) 35.39 KB -0.01% -2 B 🔽
@sentry/browser (incl. Tracing, Replay) 72.09 KB -0.01% -4 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.62 KB -0.01% -5 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 76.36 KB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay, Feedback) 88.38 KB -0.01% -2 B 🔽
@sentry/browser (incl. Feedback) 39.07 KB - -
@sentry/browser (incl. sendFeedback) 27.42 KB - -
@sentry/browser (incl. FeedbackAsync) 32.25 KB - -
@sentry/react 25.49 KB - -
@sentry/react (incl. Tracing) 38.14 KB -0.02% -5 B 🔽
@sentry/vue 27.07 KB -0.04% -9 B 🔽
@sentry/vue (incl. Tracing) 37.24 KB -0.02% -4 B 🔽
@sentry/svelte 22.86 KB - -
CDN Bundle 24.12 KB - -
CDN Bundle (incl. Tracing) 35.7 KB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay) 70.25 KB -0.01% -3 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 75.46 KB +0.01% +4 B 🔺
CDN Bundle - uncompressed 70.47 KB - -
CDN Bundle (incl. Tracing) - uncompressed 106.03 KB -0.01% -7 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 216.91 KB -0.01% -7 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.66 KB -0.01% -7 B 🔽
@sentry/nextjs (client) 38.27 KB -0.01% -3 B 🔽
@sentry/sveltekit (client) 35.9 KB +0.01% +2 B 🔺
@sentry/node 161.53 KB +0.05% +67 B 🔺
@sentry/node - without tracing 97.28 KB +0.01% +2 B 🔺
@sentry/aws-serverless 127.18 KB +0.05% +61 B 🔺

View base workflow run

@mydea mydea changed the title ref(core): Emit client reports for unsampled root spans on span start feat(core): Emit client reports for unsampled root spans on span start Jan 8, 2025
@mydea mydea merged commit b0c0004 into develop Jan 9, 2025
153 checks passed
@mydea mydea deleted the fn/unsampled-rootSpan-clientReport branch January 9, 2025 10:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants