Skip to content

ref(types): Store SampleRand as integer ticks - #1313

Draft
szokeasaurusrex wants to merge 1 commit into
szokeasaurusrex/sentry-types-sampling-modulefrom
szokeasaurusrex/sample_rand-u32
Draft

ref(types): Store SampleRand as integer ticks#1313
szokeasaurusrex wants to merge 1 commit into
szokeasaurusrex/sentry-types-sampling-modulefrom
szokeasaurusrex/sample_rand-u32

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Sep 4, 2026

Copy link
Copy Markdown
Member

SampleRand was added a while ago (#867, #868) but has barely been used in the SDK since. Upcoming work will use it as the sampling seed, per the propagated random value spec.

Reinterpret the value as an integer number of ticks (one tick = 0.000001), aligning the representation with the fixed six-decimal string propagated on the wire: Display always emits exactly six digits, parsing avoids floats, and 1.0 becomes unrepresentable.

References #735
References RUST-1

`SampleRand` was added a while ago ([#867](#867), [#868](#868)) but has barely been used in the SDK since. Upcoming work will use it as the sampling seed, per the propagated random value spec.

Reinterpret the value as an integer number of ticks (one tick = `0.000001`), aligning the representation with the fixed six-decimal string propagated on the wire: `Display` always emits exactly six digits, parsing avoids floats, and 1.0 becomes unrepresentable.

References [#735](#735)
References [RUST-1](https://linear.app/getsentry/issue/RUST-1)
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