Skip to content

feat(core): Introduce builder API for ClientOptions - #1221

Merged
szokeasaurusrex merged 1 commit into
masterfrom
szokeasaurusrex/client-options-refactor/introduce-builder
Jul 7, 2026
Merged

szokeasaurusrex merged 1 commit into
masterfrom
szokeasaurusrex/client-options-refactor/introduce-builder

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

Introduce a builder API as the preferred method for constructing ClientOptions. In the changelog, we note that the old construction method is deprecated, but unfortunately, this is the only deprecation notice; Rust does not give us a way to warn at compile time.

As the builder methods are the new primary ways for setting things, we move the field documentation to the respective builder methods. Also, we make ClientOptions #[must_use] to ensure that folks use the options after building them.

Resolves #1220
Resolves RUST-259

@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 3ea9279

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/client-options-refactor/introduce-builder branch from 231c26f to 7f5da56 Compare July 2, 2026 12:33
@linear-code

linear-code Bot commented Jul 2, 2026

Copy link
Copy Markdown

RUST-259

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/client-options-refactor/introduce-builder branch 2 times, most recently from 4695ca0 to 754109d Compare July 2, 2026 12:49
@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review July 2, 2026 13:09
@szokeasaurusrex
szokeasaurusrex requested a review from lcian as a code owner July 2, 2026 13:09
Comment thread sentry-core/src/clientoptions.rs Resolved
Comment thread sentry-core/src/clientoptions.rs Resolved
Introduce a builder API as the preferred method for constructing `ClientOptions`. In the changelog, we note that the old construction method is deprecated, but unfortunately, this is the only deprecation notice; Rust does not give us a way to warn at compile time.

As the builder methods are the new primary ways for setting things, we move the field documentation to the respective builder methods. Also, we make `ClientOptions` `#[must_use]` to ensure that folks use the options after building them.

Resolves [#1220](#1220)
Resolves [RUST-259](https://linear.app/getsentry/issue/RUST-259)
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/client-options-refactor/introduce-builder branch from 754109d to 3ea9279 Compare July 7, 2026 09:26
@szokeasaurusrex
szokeasaurusrex requested a review from a team as a code owner July 7, 2026 09:26
@szokeasaurusrex
szokeasaurusrex merged commit cd1fb7a into master Jul 7, 2026
29 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/client-options-refactor/introduce-builder branch July 7, 2026 09:31
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.

Introduce builder API for ClientOptions

2 participants