Skip to content

ref(types): Move sampling types to dedicated module - #1312

Draft
szokeasaurusrex wants to merge 1 commit into
masterfrom
szokeasaurusrex/sentry-types-sampling-module
Draft

ref(types): Move sampling types to dedicated module#1312
szokeasaurusrex wants to merge 1 commit into
masterfrom
szokeasaurusrex/sentry-types-sampling-module

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Sep 4, 2026

Copy link
Copy Markdown
Member

Move SampleRand and InvalidSampleRandError from protocol/v7.rs into a new private top-level sampling module, re-exported from the old protocol::v7 path, so the public API is unchanged. This is primarily code motion without any behavioral changes; the only non-mechanical edits are the imports the new module needs (serde, thiserror, and some std::fmt/std::str items).

This prepares the module for upcoming sampling work related to propagating the sampling seed (sample_rand) with traces.

References #735
References RUST-1

Move `SampleRand` and `InvalidSampleRandError` from `protocol/v7.rs` into a new private top-level `sampling` module, re-exported from the old `protocol::v7` path, so the public API is unchanged. This is primarily code motion without any behavioral changes; the only non-mechanical edits are the imports the new module needs (`serde`, `thiserror`, and some `std::fmt`/`std::str` items).

This prepares the module for upcoming sampling work related to propagating the sampling seed (`sample_rand`) with traces.

References [#735](#735)
References [RUST-1](https://linear.app/getsentry/issue/RUST-1)
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/sentry-types-sampling-module branch from 97b5fcb to 6b40262 Compare September 4, 2026 12:45
@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

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