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

fix(javascript): Add entry to migration guide about forcing a sampling decision #10771

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 18, 2024

Our migration guide didn't mention the removal of sampled: boolean at all previously. This PR adds an entry how to migrate forcing a sampling decision.
Since we already mention tracesSampler in the docs and how to return a definitely positive sampling decision from it, I think we don't need an extra "Forcing Sampling Decision" guide in the regular docs.

Copy link

vercel bot commented Jul 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 11:32am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 18, 2024 11:32am

Copy link

codecov bot commented Jul 18, 2024

Bundle Report

Changes will decrease total bundle size by 15 bytes ⬇️

Bundle name Size Change
sentry-docs-server 9.26MB 6 bytes ⬇️
sentry-docs-edge-server 253.22kB 3 bytes ⬇️
sentry-docs-client 7.88MB 6 bytes ⬇️

if (samplingContext.op === 'function.myFunction') {
return 1;
}
return 0.1;
Copy link
Member

Choose a reason for hiding this comment

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

The text above talks about 1 or 0, but there's a value in-between used here. Is that on purpose? I'd probably rewrite the paragraph above if so.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added an example for a positive (1) and negative (0) decision, as well as a comment to show that the 0.1 is used as a default sample rate

@Lms24 Lms24 force-pushed the lms/fix-js-force-sampling-decision branch from 85d630c to bc496ec Compare July 18, 2024 11:16
@Lms24 Lms24 enabled auto-merge (squash) July 18, 2024 11:17
@Lms24 Lms24 merged commit d929920 into master Jul 18, 2024
8 checks passed
@Lms24 Lms24 deleted the lms/fix-js-force-sampling-decision branch July 18, 2024 11:32
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants