Open
Conversation
680a83e to
24dc128
Compare
b133fd6 to
93db900
Compare
7cd8780 to
df20646
Compare
|
When user consent is revoked, write envelopes to <database>/cache/ instead of discarding them, so they are picked up by the retry module when consent is later given. Caching is conditional on the cache_keep option being enabled. - Modify sentry__capture_envelope() to cache instead of discard - Guard sentry__capture_envelope() against NULL session_envelope in process_old_runs - Add consent check to sentry__retry_send() via stored require_user_consent bool and db->user_consent atomic read Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move require_user_consent and user_consent from sentry_options_t to sentry_run_t as atomic longs. Add sentry__run_should_skip_upload() helper that batcher and retry call directly through their refcounted run pointer, replacing the fragile raw long* into options. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7398628 to
7118dbc
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8c7ca45. Configure here.
Return non-zero from sentry__retry_send() while consent is revoked so the poll task keeps rescheduling and picks up cached envelopes once consent is later given. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Trigger sentry_transport_retry() in set_user_consent() so envelopes cached while consent was revoked are flushed immediately instead of waiting for the next retry poll. Document the cache-consent interaction in the public API headers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

When a) user consent is revoked, and b)
cache_keepis enabled, cache envelopes to<db>/cache/instead of discarding them. The retry module picks them up when consent is later given, or they can be sent manually viasentry_transport_retry().Also, moves
user_consenttosentry_run_tto avoid passing rawlong *pointers to worker threads. This PR would've added yet another instance. 😅 Later on, we could consider splitting the database-level state (consent, cache, external reports...) out ofsentry_runthat is supposed to manage the.rundirectory.Close: #1521