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

feat: Pass parentSampleRate to tracesSampler #15024

Draft
wants to merge 31 commits into
base: develop
Choose a base branch
from

Conversation

lforst
Copy link
Member

@lforst lforst commented Jan 15, 2025

Ref: #14932
Ref: getsentry/team-sdks#117

This PR mainly does 2 things:

  • Pick up the sample_rate from the DSC and pass it to the tracesSampler as parentSampleRate
  • "Unfreeze" or rather set the sample_rate for a DSC of a given span whenever we applied a sample rate to the span's root span. The sample_rate is equivalent to the sample rate the root span has been sampled with. This is to ensure that downstream services can reliably use the sample_rate in the DSC to pass it to the tracesSampler - like we do in this PR (kinda closing the loop).

Copy link
Contributor

github-actions bot commented Jan 15, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.86 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.62 KB +0.18% +65 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.42 KB +0.08% +57 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.9 KB +0.07% +44 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.68 KB +0.08% +60 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.69 KB +0.07% +63 B 🔺
@sentry/browser (incl. Feedback) 39.08 KB - -
@sentry/browser (incl. sendFeedback) 27.5 KB - -
@sentry/browser (incl. FeedbackAsync) 32.27 KB - -
@sentry/react 25.56 KB - -
@sentry/react (incl. Tracing) 38.41 KB +0.14% +54 B 🔺
@sentry/vue 27 KB +0.22% +58 B 🔺
@sentry/vue (incl. Tracing) 37.37 KB +0.15% +57 B 🔺
@sentry/svelte 22.99 KB - -
CDN Bundle 24.27 KB - -
CDN Bundle (incl. Tracing) 35.95 KB +0.11% +37 B 🔺
CDN Bundle (incl. Tracing, Replay) 70.59 KB +0.06% +43 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 75.72 KB +0.06% +40 B 🔺
CDN Bundle - uncompressed 70.81 KB - -
CDN Bundle (incl. Tracing) - uncompressed 106.52 KB +0.1% +101 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.35 KB +0.05% +101 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.88 KB +0.05% +101 B 🔺
@sentry/nextjs (client) 38.52 KB +0.15% +56 B 🔺
@sentry/sveltekit (client) 36.16 KB +0.16% +58 B 🔺
@sentry/node 161.38 KB +0.04% +66 B 🔺
@sentry/node - without tracing 97.11 KB +0.01% +1 B 🔺
@sentry/aws-serverless 127.06 KB +0.05% +58 B 🔺

View base workflow run

Copy link

codecov bot commented Jan 15, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
695 1 694 299
View the full list of 1 ❄️ flaky tests
tracing/request/fetch/test.ts should create spans for fetch requests

Flake rate in main: 11.11% (Passed 24 times, Failed 3 times)

Stack Traces | 10.1s run time
test.ts:7:11 should create spans for fetch requests

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Base automatically changed from lforst-sample-rand to develop January 16, 2025 12:33
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.

1 participant