Skip to content

Limit the window's Event Sample Rate to 0.01 through 1.0 - #2929

Draft
bitsandfoxes wants to merge 3 commits into
mainfrom
fix/event-sample-rate-minimum
Draft

bitsandfoxes wants to merge 3 commits into
mainfrom
fix/event-sample-rate-minimum

Conversation

@bitsandfoxes

Copy link
Copy Markdown
Contributor

The Event Sample Rate field in the Sentry window accepted values from 0 to 1. sentry-dotnet's SentryOptions.SampleRate throws for 0, so with the field set to 0, loading the options threw: the SDK didn't initialize, and build steps that load the options failed.

The field now accepts values from 0.01 (1%), the documented minimum in sentry-dotnet, to 1.0, and the tooltip states the range. Setting SampleRate = 0 in code still throws in sentry-dotnet, as before.

Tests: CoreTabTests covers the clamp at and around both ends, and that a value of 0 clamped by the window loads through ToSentryUnityOptions without throwing. Both fail with the previous [0, 1] clamp.

🤖 Generated with Claude Code

@bitsandfoxes
bitsandfoxes force-pushed the fix/event-sample-rate-minimum branch from 0444d78 to 1f5496d Compare November 4, 2026 15:47
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