Skip to content

fix(core): Ensure standalone spans respect sampled flag #12533

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

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

AbhiPrasad
Copy link
Member

@edwardgou-sentry pointed out that sendSpanEnvelope immediately sends spans without checking for this._sampled, which means you can't use tracesSampler to filter them. This changes that!

We also record client outcomes for sample_rate with spans.

@AbhiPrasad AbhiPrasad requested review from mydea, edwardgou-sentry and a team June 18, 2024 20:24
@AbhiPrasad AbhiPrasad self-assigned this Jun 18, 2024
@AbhiPrasad AbhiPrasad requested review from andreiborza and removed request for a team June 18, 2024 20:24
Copy link
Contributor

@edwardgou-sentry edwardgou-sentry left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.03 KB (0%)
@sentry/browser (incl. Tracing) 33.23 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing, Replay) 69 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.31 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.07 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.23 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.05 KB (+0.04% 🔺)
@sentry/browser (incl. metrics) 26.24 KB (+0.11% 🔺)
@sentry/browser (incl. Feedback) 38.24 KB (0%)
@sentry/browser (incl. sendFeedback) 26.65 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.22 KB (0%)
@sentry/react 24.77 KB (0%)
@sentry/react (incl. Tracing) 36.28 KB (+0.09% 🔺)
@sentry/vue 26.06 KB (+0.1% 🔺)
@sentry/vue (incl. Tracing) 35.09 KB (+0.08% 🔺)
@sentry/svelte 22.17 KB (0%)
CDN Bundle 23.36 KB (0%)
CDN Bundle (incl. Tracing) 34.9 KB (+0.03% 🔺)
CDN Bundle (incl. Tracing, Replay) 69.03 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.21 KB (+0.03% 🔺)
CDN Bundle - uncompressed 68.68 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.34 KB (+0.06% 🔺)
CDN Bundle (incl. Tracing, Replay) - uncompressed 213.81 KB (+0.04% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 226.4 KB (+0.04% 🔺)
@sentry/nextjs (client) 36.17 KB (+0.08% 🔺)
@sentry/sveltekit (client) 33.86 KB (+0.09% 🔺)
@sentry/node 112.67 KB (0%)
@sentry/node - without tracing 90.07 KB (0%)
@sentry/aws-serverless 99.16 KB (0%)

@AbhiPrasad AbhiPrasad merged commit 1d66b8a into develop Jun 19, 2024
113 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-inp-tracessampler branch June 19, 2024 00:07
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