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

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

@szokeasaurusrex
szokeasaurusrex removed this pull request from stack #1314 September 22, 2026 15:01
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/sample_rand-u32 branch from f286125 to b0dd1b5 Compare September 22, 2026 15:02
`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)
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/sample_rand-u32 branch from b0dd1b5 to 4085c75 Compare September 24, 2026 10:09

This branch has not been deployed

No deployments
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