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): Add sampling decision to trace envelope header #8483

Merged
merged 7 commits into from Jul 12, 2023

Conversation

AbhiPrasad
Copy link
Member

resolves #8482

To save on bundle size, we only add sampled to the DSC if there is an active transaction

This matches https://github.com/getsentry/relay/blob/11f1ab455e2d5abc11d05776f8ec4a83cfd8c66e/relay-general/src/protocol/contexts/trace.rs#L109-L112

@github-actions
Copy link
Contributor

github-actions bot commented Jul 10, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.95 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 69.13 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 20.28 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 60.38 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.9 KB (0%)
@sentry/browser - Webpack (minified) 71.51 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.92 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 50.58 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 30.11 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 28.16 KB (+0.07% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 49.42 KB (0%)
@sentry/replay - Webpack (gzipped + minified) 43.1 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 69.51 KB (+0.02% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 61.82 KB (0%)

@AbhiPrasad AbhiPrasad force-pushed the abhi-sampling-decision-trace-env branch from e8e2180 to 2e06d84 Compare July 11, 2023 15:39
@AbhiPrasad AbhiPrasad marked this pull request as ready for review July 11, 2023 15:39
@AbhiPrasad AbhiPrasad requested review from a team, stephanie-anderson and lforst and removed request for a team July 11, 2023 15:39
// Uncomment if we want to make DSC immutable
// this._frozenDynamicSamplingContext = dsc;

client.emit && client.emit('createDsc', dsc);
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this because getDynamicSamplingContextFromClient already emits createDsc on the client as a side effect, so no need to duplicate it.

@AbhiPrasad AbhiPrasad merged commit 6e4e805 into develop Jul 12, 2023
68 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-sampling-decision-trace-env branch July 12, 2023 13:38
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.

Add Sampling Decision to Trace Envelope Header
2 participants