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(core): Deprecate Transaction.getDynamicSamplingContext in favour of getDynamicSamplingContextFromSpan #10094

Merged
merged 10 commits into from
Jan 10, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 8, 2024

This PR deprecates Transaction.getDynamicSamplingContext and introduces its direct replacement, a top-level utility function. Note that IMO this only is an intermediate step we should take to rework how we generate and handle the DSC creation. More details in #10095

Used various new APIs like spanToJSON and spanIsSampled. Observed that a slight behavioural change is, that isSpanSampled always returns a boolean while span.sampled could also be undefined. Considering integration tests still pass, I'd say this is fine.

Added new tests for the top level helper and left the older ones in place to still cover transaction.getDSC.

Copy link
Contributor

github-actions bot commented Jan 8, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 76.98 KB (+0.13% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.36 KB (+0.17% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 61.99 KB (+0.19% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.38 KB (+0.31% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 30.98 KB (+0.79% 🔺)
@sentry/browser - Webpack (gzipped) 22.31 KB (+0.96% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 74.61 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 66.26 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.07 KB (+0.11% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 23.9 KB (+0.66% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 208.7 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 96.75 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 71.35 KB (+0.57% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.04 KB (+0.13% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.72 KB (+0.14% 🔺)
@sentry/react - Webpack (gzipped) 22.35 KB (+1% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.37 KB (+0.02% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.5 KB (+0.05% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.01 KB (+1.53% 🔺)

@Lms24 Lms24 force-pushed the lms/feat-code-add-getDynamicSamplingFromSpan branch from 9f1b607 to 5a5cd5c Compare January 8, 2024 16:52
@Lms24 Lms24 force-pushed the lms/feat-code-add-getDynamicSamplingFromSpan branch from fd8df14 to 342763c Compare January 9, 2024 11:27
@Lms24 Lms24 self-assigned this Jan 9, 2024
@Lms24 Lms24 marked this pull request as ready for review January 9, 2024 11:27
@Lms24 Lms24 requested review from mydea and lforst January 9, 2024 11:27
@Lms24 Lms24 force-pushed the lms/feat-code-add-getDynamicSamplingFromSpan branch from 2319af5 to 5b5dcea Compare January 9, 2024 13:24
@Lms24 Lms24 merged commit 6faec42 into develop Jan 10, 2024
95 checks passed
@Lms24 Lms24 deleted the lms/feat-code-add-getDynamicSamplingFromSpan branch January 10, 2024 10:55
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.

3 participants