Repository navigation
feat(client): Add a global refresh() to the Rust client - #202
Merged
Merged
Conversation
joshuarli
marked this pull request as ready for review
October 16, 2026 22:42
Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com> Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/rust-global-refresh
branch
from
October 16, 2026 22:44
98dd094 to
09d2179
Compare
kenzoengineer
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#156 added manual refresh and
with_refresh_threshold(None). In Rust, though,refresh()only exists as anOptionsmethod. The global store thatinit()andOptions::builder()...init()create is a privateOnceLock, so callers can't reach it. A Rust service that runs.with_refresh_threshold(None).init()therefore never reloads its values for the life of the process, whileoptions()andfeatures()keep serving the first snapshot.Python doesn't have this gap.
sentry_options.refresh()already refreshes the Python global. objectstore isn't affected either: it calls.build()and refreshes its own instance (getsentry/objectstore#549).This PR adds
sentry_options::refresh() -> Result<bool>, which refreshes the global store. It mirrors the Python function and returnsNotInitializedwhen called beforeinit(). The new test is in its own integration test binary, because it sets the process-wide store. Without the fix, that test does not compile.The docs in
setup.mdandarchitecture.mdnow namesentry_options::refresh()for the global store. They overlap with the docs refresh in #201, which currently says the global store has norefresh(). Whichever PR merges second will need a small rebase.Open question for review: should the Rust
init()docs or the builder docs warn thatwith_refresh_threshold(None)needs a refresh driver? Today only the prose docs say so.via @joshuarli.
--
View Junior Session [Sentry]