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-8749] Trim breadcrumbs in oversized payloads #1451

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Aug 8, 2022

Goal

Reduce number of errors being lost due to exceeding Bugsnag's size limit.

Design

Removes and / or trims (removing their message and metadata) breadcrumbs until the event payload fits within the size limit.

Changeset

Adds trimming method -[BugsnagEvent trimBreadcrumbs:] which accepts a number of bytes to trim.

Updates BSGEventUploadOperation to call trimBreadcrumbs: if the payload exceeds the size limit.

Testing

Adds unit test cases and an E2E scenario to verify behaviour.

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Bugsnag.framework binary size increased by 136 bytes from 771,504 to 771,640

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.6% +1.54Ki  +0.6% +1.54Ki    __TEXT,__text
  +4.5%    +156  +4.5%    +156    __TEXT,__gcc_except_tab
  +0.6%    +128  +0.6%    +128    __DATA,__cfstring
  +0.5%     +99  +0.5%     +99    __TEXT,__cstring
  +0.3%     +81  +0.3%     +81    __TEXT,__objc_methname
  +0.1%     +80  +0.1%     +80    Symbol Table
  +0.0%     +48  +0.0%     +48    String Table
  +0.5%     +32  +0.5%     +32    __DATA,__objc_selrefs
  +0.0%     +24  +0.0%     +24    __DATA,__objc_const
  +0.4%      +8  +0.4%      +8    Function Start Addresses
  [ = ]       0  -0.9%    -136    [__LINKEDIT]
  -1.6%    -184  -9.2%    -184    [__DATA]
 -12.5% -1.87Ki -12.5% -1.87Ki    [__TEXT]
  +0.0%    +136  [ = ]       0    TOTAL

Generated by 🚫 Danger

@nickdowell nickdowell merged commit 3f12d4a into next Aug 9, 2022
@nickdowell nickdowell deleted the nickdowell/trim-breadcrumbs branch August 9, 2022 07:11
@nickdowell nickdowell mentioned this pull request Aug 10, 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.

2 participants