Skip to content

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

Open
szokeasaurusrex wants to merge 1 commit into
masterfrom
szokeasaurusrex/client-options-refactor/introduce-builder
Open

feat(core): Introduce builder API for ClientOptions#1221
szokeasaurusrex wants to merge 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 754109d

@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 from 7f5da56 to 4695ca0 Compare July 2, 2026 12:46
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 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
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

1 participant