Skip to content

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Jan 17, 2025

We had a bug because for DSC creation we were reading the propagation context off the scope of a particular span. Turns out we cannot do that in otel for NonRecordingSpans. As a workaround we now write the sample rand when a span's sampling decision is made onto the span's context's trace state, and then read it when we create the DSC for that span. As a fallback we still attempt to read from the span's scope - this should work for all non-OTEL runtimes.

Copy link
Contributor

github-actions bot commented Jan 17, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.87 KB +0.04% +9 B 🔺
@sentry/browser - with treeshaking flags 21.54 KB +0.06% +12 B 🔺
@sentry/browser (incl. Tracing) 35.57 KB +0.03% +9 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.38 KB +0.01% +6 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.87 KB +0.02% +10 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.63 KB +0.01% +7 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.63 KB +0.01% +7 B 🔺
@sentry/browser (incl. Feedback) 39.09 KB +0.03% +10 B 🔺
@sentry/browser (incl. sendFeedback) 27.51 KB +0.03% +8 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.28 KB +0.03% +9 B 🔺
@sentry/react 25.57 KB +0.04% +9 B 🔺
@sentry/react (incl. Tracing) 38.37 KB +0.02% +7 B 🔺
@sentry/vue 26.95 KB +0.03% +8 B 🔺
@sentry/vue (incl. Tracing) 37.32 KB +0.03% +8 B 🔺
@sentry/svelte 23 KB +0.04% +9 B 🔺
CDN Bundle 24.28 KB +0.04% +8 B 🔺
CDN Bundle (incl. Tracing) 35.91 KB +0.03% +8 B 🔺
CDN Bundle (incl. Tracing, Replay) 70.54 KB +0.02% +9 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 75.68 KB +0.02% +8 B 🔺
CDN Bundle - uncompressed 70.83 KB +0.05% +30 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 106.46 KB +0.03% +30 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.28 KB +0.02% +30 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.82 KB +0.02% +30 B 🔺
@sentry/nextjs (client) 38.48 KB +0.03% +9 B 🔺
@sentry/sveltekit (client) 36.11 KB +0.02% +7 B 🔺
@sentry/node 161.35 KB +0.02% +31 B 🔺
@sentry/node - without tracing 97.14 KB +0.03% +28 B 🔺
@sentry/aws-serverless 127.03 KB +0.03% +33 B 🔺

View base workflow run

Copy link

codecov bot commented Jan 17, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
688 3 685 299
View the top 2 failed tests by shortest run time
basic.test.ts Lambda layer SDK bundle sends events
Stack Traces | 133s run time
basic.test.ts:5:5 Lambda layer SDK bundle sends events
basic.test.ts AWS Serverless SDK sends events in ESM mode
Stack Traces | 133s run time
basic.test.ts:5:5 AWS Serverless SDK sends events in ESM mode
View the full list of 1 ❄️ flaky tests
request-instrumentation.test.ts Should send a transaction with a fetch span

Flake rate in main: 36.36% (Passed 7 times, Failed 4 times)

Stack Traces | 30s run time
request-instrumentation.test.ts:4:5 Should send a transaction with a fetch span

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

@lforst lforst changed the title fix: Fix sample rand propagation for negative sampling decisions fix(node): Fix sample rand propagation for negative sampling decisions Jan 17, 2025
@lforst lforst requested a review from mydea January 17, 2025 12:19
@lforst lforst marked this pull request as ready for review January 17, 2025 12:19
@lforst lforst merged commit d464269 into develop Jan 20, 2025
148 checks passed
@lforst lforst deleted the lforst-fix-sample-rand branch January 20, 2025 08:29
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