-
-
Notifications
You must be signed in to change notification settings - Fork 202
feat(transport): add HTTP retry with exponential backoff #1520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jpnurmi
wants to merge
102
commits into
master
Choose a base branch
from
jpnurmi/feat/http-retry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,940
−115
Open
Changes from all commits
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
663f3bb
feat(transport): add HTTP retry logic with exponential backoff
jpnurmi 52a273e
fix(retry): filter startup scan by timestamp, create cache dir
jpnurmi e230f8b
fix(retry): use wall clock time instead of monotonic time
jpnurmi 3810f2b
ref(retry): define backoff base in seconds
jpnurmi a910f32
ref(retry): replace scan+free_paths with foreach callback API
jpnurmi 8b8921b
feat(transport): set 15s request timeout for curl and winhttp
jpnurmi 46d2a9e
fix(retry): avoid duplicate delayed retry tasks on startup
jpnurmi 4f3d625
ref(retry): take options in sentry__retry_new, own path construction
jpnurmi 199bd30
ref(retry): set startup_time at creation, remove setter
jpnurmi 94a7ca7
fix(retry): return total file count so polling continues during backoff
jpnurmi 011fbb5
fix(retry): use callback return value to track remaining retry files
jpnurmi f673193
ref(retry): rename constants to SENTRY_RETRY_INTERVAL and SENTRY_RETR…
jpnurmi caef6c1
ref(retry): encapsulate retry scheduling into the retry module
jpnurmi 9c7c99d
ref(transport): remove unnecessary includes, restore blank line
jpnurmi 3813feb
ref(retry): move precondition checks to callers
jpnurmi ea5233f
ref(transport): extract http_send_envelope helper
jpnurmi f17f8f9
test(retry): remove redundant retry_no_duplicate_rescan test
jpnurmi e7886a4
ref(curl): use CURLOPT_TIMEOUT_MS for consistency with winhttp and cr…
jpnurmi ce4ac80
ref(retry): unify startup and poll into a single task
jpnurmi 34d5131
ref(retry): extract sentry__retry_make_path helper
jpnurmi 8015d2c
fix(retry): prevent envelope duplication between retry and cache
jpnurmi 8fcdb4f
ref(database): derive can_cache flag to skip cache dir creation early
jpnurmi 551ad74
ref(retry): change send callback to envelope-based API
jpnurmi d2f1a07
test(retry): verify cache_keep preserves envelopes on successful send
jpnurmi 3750856
fix(retry): use PRIu64 format specifier for uint64_t
jpnurmi 0cbf407
fix(retry): guard against unsigned underflow in backoff check
jpnurmi 3b2a5d6
fix(retry): prevent startup poll from re-processing same-session enve…
jpnurmi 6608084
fix(retry): flush pending retries on shutdown
jpnurmi 961ec95
ref(retry): use millisecond timestamps for retry filenames
jpnurmi 558c32e
fix(retry): flush pending retries synchronously before shutdown
jpnurmi be1d7cf
fix(retry): stop retrying on network failure
jpnurmi fccc565
fix(retry): dump unsent envelopes to retry dir on shutdown timeout
jpnurmi d831987
test(retry): update expectations for stop-on-failure behavior
jpnurmi 69f4f68
style(retry): fix line length in unit tests
jpnurmi 5562feb
fix(retry): prevent duplicate envelope writes from detached worker
jpnurmi 0664fb3
docs: add changelog entry for HTTP retry feature
jpnurmi c241adf
test(retry): use sentry__retry_send instead of duplicated eligibility…
jpnurmi a053ccb
fix(retry): raise backoff cap from 2h to 8h to match crashpad
jpnurmi 71ee17a
refactor(retry): introduce retry_item_t to avoid re-parsing filenames
jpnurmi dfe7c1f
feat(retry): add debug and warning output for HTTP retries
jpnurmi 5d80da6
refactor(cache): add cache_path to sentry_run_t and centralize cache …
jpnurmi 06cca66
fix(transport): use connect-only timeouts for curl and winhttp
jpnurmi fd6c577
fix(retry): decrement total count when removing corrupt envelope files
jpnurmi 173de80
fix(retry): only warn about exhausted retries on network failure
jpnurmi 0482bf4
docs(retry): add doc comments to sentry_retry.h declarations
jpnurmi 39f36ec
feat(transport): add sentry_transport_retry()
jpnurmi 7b30688
refactor(retry): store retry envelopes in cache/ directory
jpnurmi e6c8db4
fix(retry): own cache_path to prevent use-after-free on detached thread
jpnurmi c520575
fix(retry): don't consume shutdown timeout with bgworker flush
jpnurmi 79d1732
fix(retry): flush in-flight retries before shutdown
jpnurmi 344dcc8
refactor(retry): replace http_retries count with boolean http_retry
jpnurmi 5cdcc47
fix(transport): use explicit WinHTTP send/receive timeouts
jpnurmi 9136500
fix(retry): deduplicate poll tasks on concurrent envelope failures
jpnurmi 9b14dc2
fix(retry): set sealed flag before dumping queued envelopes
jpnurmi e75f595
fix(retry): prevent retry flush from consuming shutdown timeout
jpnurmi 136fabf
fix(retry): zero-initialize retry struct after malloc
jpnurmi 1a0d99b
fix(retry): skip flush task after seal to prevent duplicate sends
jpnurmi ed28b85
refactor(database): remove unused sentry__run_write_cache
jpnurmi 62999c3
fix(retry): make trigger one-shot to prevent rapid retry exhaustion
jpnurmi 70b1040
fix(core): check http_retry option instead of transport capability
jpnurmi 794df4b
fix(retry): prevent UB from negative count in backoff shift
jpnurmi 83475e4
fix(options): normalize http_retry with !! to match other boolean set…
jpnurmi 8aae746
revert(database): restore original variable names and whitespace in w…
jpnurmi 791d598
docs: clarify sentry_transport_retry behavior and limitations
jpnurmi a2efe25
docs(retry): document retry behavior for network failures vs HTTP res…
jpnurmi 4b1e7d7
fix(retry): only clear startup_time when envelope is written
jpnurmi 6064f1d
fix(retry): check for NULL from sentry__path_clone
jpnurmi 45ee886
fix(retry): apply backoff when system clock moves backward
jpnurmi ec59d5e
fix(retry): increase SENTRY_RETRY_ATTEMPTS to 6 to match Crashpad
jpnurmi 00bef01
fix(retry): avoid retry flush consuming entire shutdown timeout
jpnurmi d96beb1
fix(retry): warn on failed retry envelope rename
jpnurmi 985b3da
fix(retry): check for NULL from sentry__path_clone in retry send
jpnurmi 87532a3
fix(retry): fix data race on startup_time between threads
jpnurmi 754a65d
fix(retry): clear retry_func when retry fails to initialize
jpnurmi 0e64115
fix(retry): persist non-event envelopes to the retry cache
jpnurmi 9ab3e11
fix(retry): close race between poll task and enqueue on scheduled flag
jpnurmi 5a10044
refactor(database): add retry_count to write_envelope, add sentry__ru…
jpnurmi f35817d
refactor(database): make sentry_run_t refcounted
jpnurmi 123a7be
refactor(cache): strip retry prefix in move_cache and simplify handle…
jpnurmi acfd148
fix(cache): use cache_name instead of src_name for UUID in move_cache
jpnurmi 019e0e9
fix(retry): prevent duplicate cache writes during shutdown race
jpnurmi 0e83c47
fix(cache): replace length heuristic with proper filename parsing in …
jpnurmi 5f8e452
docs: fix retry count 5 → 6 in sentry_transport_retry docs
jpnurmi 69ffc09
fix(retry): prevent poll task from re-arming after shutdown
jpnurmi e50dcf5
fix(winhttp): cancel in-flight request before shutdown to unblock worker
jpnurmi db19679
fix(winhttp): fix double-close race on client->request between cancel…
jpnurmi 898308d
fix(winhttp): use on_timeout callback to unblock worker instead of ca…
jpnurmi 7db3274
fix(winhttp): remove unnecessary local request snapshot in winhttp_se…
jpnurmi 5b32779
fix(sync): don't force running=0 before on_timeout callback
jpnurmi 9c8d803
fix(test): disable transport retry in unit tests to fix valgrind flak…
jpnurmi a91842a
fix(retry): clear sealed_envelope after match to prevent address-reus…
jpnurmi c17329a
ref: consolidate filename formatting into make_cache_path
jpnurmi 3461f52
Adapt to sentry__session_new() change
jpnurmi 36568c1
ref: cache envelopes only on failed HTTP send
jpnurmi 1d85dd8
Clarify bgworker shutdown timeout comment
jpnurmi 168a807
Cache envelopes only on failed HTTP send
jpnurmi c0f920d
Remove unused sentry__transport_can_retry
jpnurmi bb06d6f
fix: incref options in cleanup task to prevent use-after-free
jpnurmi 8840444
Update sentry docs URL for network failure handling
jpnurmi 93d884a
Replace pointer comparison with envelope tag in retry seal check
jpnurmi 93db900
Add TODO for retry jitter and shorter poll interval
jpnurmi 8f104d2
Initialize tag for raw envelopes loaded from disk
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.