-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
93
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,746
−72
Open
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
8d0033b
feat(transport): add HTTP retry logic with exponential backoff
jpnurmi 0f37177
fix(retry): filter startup scan by timestamp, create cache dir
jpnurmi f321bc6
fix(retry): use wall clock time instead of monotonic time
jpnurmi f5e8c5f
ref(retry): define backoff base in seconds
jpnurmi 9fb83b8
ref(retry): replace scan+free_paths with foreach callback API
jpnurmi 315b79e
feat(transport): set 15s request timeout for curl and winhttp
jpnurmi 7c7d06c
fix(retry): avoid duplicate delayed retry tasks on startup
jpnurmi 22c26da
ref(retry): take options in sentry__retry_new, own path construction
jpnurmi 5d706c6
ref(retry): set startup_time at creation, remove setter
jpnurmi d29c20c
fix(retry): return total file count so polling continues during backoff
jpnurmi aeef825
fix(retry): use callback return value to track remaining retry files
jpnurmi 5c20a62
ref(retry): rename constants to SENTRY_RETRY_INTERVAL and SENTRY_RETR…
jpnurmi a411b29
ref(retry): encapsulate retry scheduling into the retry module
jpnurmi 38af347
ref(transport): remove unnecessary includes, restore blank line
jpnurmi 58e6f89
ref(retry): move precondition checks to callers
jpnurmi 7dc961e
ref(transport): extract http_send_envelope helper
jpnurmi 633a347
test(retry): remove redundant retry_no_duplicate_rescan test
jpnurmi 32dfe4c
ref(curl): use CURLOPT_TIMEOUT_MS for consistency with winhttp and cr…
jpnurmi dc7c627
ref(retry): unify startup and poll into a single task
jpnurmi d94191a
ref(retry): extract sentry__retry_make_path helper
jpnurmi 325cef5
fix(retry): prevent envelope duplication between retry and cache
jpnurmi 7ad242d
ref(database): derive can_cache flag to skip cache dir creation early
jpnurmi 2e5a599
ref(retry): change send callback to envelope-based API
jpnurmi 3b7af08
test(retry): verify cache_keep preserves envelopes on successful send
jpnurmi cc729dc
fix(retry): use PRIu64 format specifier for uint64_t
jpnurmi 91aa134
fix(retry): guard against unsigned underflow in backoff check
jpnurmi 0036998
fix(retry): prevent startup poll from re-processing same-session enve…
jpnurmi a201162
fix(retry): flush pending retries on shutdown
jpnurmi 10dc2da
ref(retry): use millisecond timestamps for retry filenames
jpnurmi f464c0c
fix(retry): flush pending retries synchronously before shutdown
jpnurmi dd11aa2
fix(retry): stop retrying on network failure
jpnurmi 5c05a53
fix(retry): dump unsent envelopes to retry dir on shutdown timeout
jpnurmi 7bff90a
test(retry): update expectations for stop-on-failure behavior
jpnurmi 4db204a
style(retry): fix line length in unit tests
jpnurmi 2d31e52
fix(retry): prevent duplicate envelope writes from detached worker
jpnurmi 329acce
docs: add changelog entry for HTTP retry feature
jpnurmi e097a7d
test(retry): use sentry__retry_send instead of duplicated eligibility…
jpnurmi 6dbb184
fix(retry): raise backoff cap from 2h to 8h to match crashpad
jpnurmi 15ae77f
refactor(retry): introduce retry_item_t to avoid re-parsing filenames
jpnurmi 3931a7c
feat(retry): add debug and warning output for HTTP retries
jpnurmi 669d884
refactor(cache): add cache_path to sentry_run_t and centralize cache …
jpnurmi 50ac89d
fix(transport): use connect-only timeouts for curl and winhttp
jpnurmi b3f20a8
fix(retry): decrement total count when removing corrupt envelope files
jpnurmi 31e48a6
fix(retry): only warn about exhausted retries on network failure
jpnurmi e1a7ad8
docs(retry): add doc comments to sentry_retry.h declarations
jpnurmi 6027d42
feat(transport): add sentry_transport_retry()
jpnurmi 7672ec1
refactor(retry): store retry envelopes in cache/ directory
jpnurmi 5f2b64d
fix(retry): own cache_path to prevent use-after-free on detached thread
jpnurmi 5209671
fix(retry): don't consume shutdown timeout with bgworker flush
jpnurmi 51e7ff5
fix(retry): flush in-flight retries before shutdown
jpnurmi 44d9e9d
refactor(retry): replace http_retries count with boolean http_retry
jpnurmi 7a949f6
fix(transport): use explicit WinHTTP send/receive timeouts
jpnurmi fdccfd5
fix(retry): deduplicate poll tasks on concurrent envelope failures
jpnurmi feb9b64
fix(retry): set sealed flag before dumping queued envelopes
jpnurmi 278231e
fix(retry): prevent retry flush from consuming shutdown timeout
jpnurmi b5b7485
fix(retry): zero-initialize retry struct after malloc
jpnurmi a9715ff
fix(retry): skip flush task after seal to prevent duplicate sends
jpnurmi 2c9489c
refactor(database): remove unused sentry__run_write_cache
jpnurmi 3dbd17a
fix(retry): make trigger one-shot to prevent rapid retry exhaustion
jpnurmi 0eb79d0
fix(core): check http_retry option instead of transport capability
jpnurmi 4260ca3
fix(retry): prevent UB from negative count in backoff shift
jpnurmi 60c5e77
fix(options): normalize http_retry with !! to match other boolean set…
jpnurmi 750fd59
revert(database): restore original variable names and whitespace in w…
jpnurmi 9feac1b
Merge remote-tracking branch 'upstream/master' into jpnurmi/feat/http…
jpnurmi a710a78
docs: clarify sentry_transport_retry behavior and limitations
jpnurmi 282bd46
docs(retry): document retry behavior for network failures vs HTTP res…
jpnurmi f8a4f07
fix(retry): only clear startup_time when envelope is written
jpnurmi b6260c0
fix(retry): check for NULL from sentry__path_clone
jpnurmi a55b944
fix(retry): apply backoff when system clock moves backward
jpnurmi 81d0f68
fix(retry): increase SENTRY_RETRY_ATTEMPTS to 6 to match Crashpad
jpnurmi e28b88e
fix(retry): avoid retry flush consuming entire shutdown timeout
jpnurmi 0b78591
fix(retry): warn on failed retry envelope rename
jpnurmi 4fa8410
fix(retry): check for NULL from sentry__path_clone in retry send
jpnurmi cd376db
fix(retry): fix data race on startup_time between threads
jpnurmi 889ba35
fix(retry): clear retry_func when retry fails to initialize
jpnurmi ce89de0
fix(retry): persist non-event envelopes to the retry cache
jpnurmi 1881212
fix(retry): close race between poll task and enqueue on scheduled flag
jpnurmi ca270ea
Merge branch 'master' into jpnurmi/feat/http-retry
jpnurmi b35273b
refactor(database): add retry_count to write_envelope, add sentry__ru…
jpnurmi 77cc3dd
refactor(database): make sentry_run_t refcounted
jpnurmi 4c108f4
refactor(cache): strip retry prefix in move_cache and simplify handle…
jpnurmi e57c6fb
fix(cache): use cache_name instead of src_name for UUID in move_cache
jpnurmi 5e80d4b
fix(retry): prevent duplicate cache writes during shutdown race
jpnurmi a5bb080
fix(cache): replace length heuristic with proper filename parsing in …
jpnurmi 30dbb71
docs: fix retry count 5 → 6 in sentry_transport_retry docs
jpnurmi a3c584c
fix(retry): prevent poll task from re-arming after shutdown
jpnurmi b961573
fix(winhttp): cancel in-flight request before shutdown to unblock worker
jpnurmi 8bf1503
fix(winhttp): fix double-close race on client->request between cancel…
jpnurmi bdc936a
fix(winhttp): use on_timeout callback to unblock worker instead of ca…
jpnurmi 02e47f1
fix(winhttp): remove unnecessary local request snapshot in winhttp_se…
jpnurmi 1730406
fix(sync): don't force running=0 before on_timeout callback
jpnurmi b373e70
fix(test): disable transport retry in unit tests to fix valgrind flak…
jpnurmi fcb96f2
fix(retry): clear sealed_envelope after match to prevent address-reus…
jpnurmi 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
Some comments aren't visible on the classic Files Changed page.
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
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.