Skip to content
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

[PLAT-8413] Delete oversized or stale persisted errors #1367

Merged
merged 1 commit into from May 17, 2022

Conversation

nickdowell
Copy link
Contributor

Goal

Prevent error event sending from being retried indefinitely in the event of HTTP or connection errors, by discarding them once more than 60 days old or if too large.

Changeset

BSGEventUploadFileOperation deletes and BSGEventUploadObjectOperation skips persistence if sending fails and

  • the file was created over 60 days ago or
  • the HTTP body size is greater than 1MB

BugsnagApiClient now returns the HTTP body so that its size can be checked without re-encoding. Note that the size of an event on disk may be very different from the size of the HTTP body if OnSendError callbacks make any major changes.

Testing

Adds E2E scenarios to verify that oversized and stale payloads are not retried.

@github-actions
Copy link

Bugsnag.framework binary size increased by 176 bytes from 819,680 to 819,856

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2%    +536  +0.2%    +536    __TEXT,__text
  +0.1%    +144  +0.1%    +144    Symbol Table
  +1.1%     +48  +1.1%     +48    Lazy Binding Info
  +0.6%     +44  +0.3%     +44    [__DATA]
  +0.8%     +16  +0.8%     +16    __TEXT,__const
  +0.5%     +14  +0.5%     +14    __TEXT,__objc_methtype
  +0.6%     +12  +0.6%     +12    __TEXT,__stub_helper
  +0.6%     +12  +0.6%     +12    __TEXT,__stubs
  +0.5%      +8  +0.5%      +8    Indirect Symbol Table
  +0.6%      +8  +0.6%      +8    __DATA,__la_symbol_ptr
  -0.4%      -4  -0.4%      -4    __DATA,__objc_ivar
  -0.0%     -24  -0.0%     -24    String Table
  -0.1%     -48  -0.1%     -48    __DATA,__objc_const
  -0.3%     -76  -0.3%     -76    __TEXT,__objc_methname
  [ = ]       0  -1.1%    -176    [__LINKEDIT]
  -3.2%    -514  -3.2%    -514    [__TEXT]
  +0.0%    +176  [ = ]       0    TOTAL

Generated by 🚫 Danger

@nickdowell nickdowell requested a review from kstenerud May 16, 2022 15:03
@nickdowell nickdowell merged commit ec20cbf into next May 17, 2022
@nickdowell nickdowell deleted the nickdowell/discard-oversized-or-stale-events branch May 17, 2022 07:50
@nickdowell nickdowell mentioned this pull request May 18, 2022
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.

None yet

2 participants