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

Refactor BugsnagApiClient #1450

Merged
merged 4 commits into from
Aug 8, 2022
Merged

Refactor BugsnagApiClient #1450

merged 4 commits into from
Aug 8, 2022

Conversation

nickdowell
Copy link
Contributor

Goal

Make a change required for efficient implementation of breadcrumb trimming functionality (coming in a subsequent PR).

Changeset

Changes BugsnagApiClient to accept NSData and leave JSON encoding to callers - this is the change required for efficient trimming.

Makes BugsnagApiClient responsible for setting Bugsnag-Sent-At header.

Removes unused BugsnagConfiguration.sessionApiHeaders.

Replaces BugsnagApiClient class with equivalent C functions.

Renames BugsnagApiClientDeliveryStatus to BSGDeliveryStatus.

Simplified integrity header generation by including "sha1 " prefix in function's result.

Testing

Covered by existing unit and E2E tests.

@github-actions
Copy link

github-actions bot commented Aug 8, 2022

Bugsnag.framework binary size decreased by 3,088 bytes from 774,592 to 771,504 🎉

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0   +26% +3.02Ki    [__LINKEDIT]
   +13% +1.74Ki   +13% +1.74Ki    [__TEXT]
  +7.7%    +836   +72%    +836    [__DATA]
  +0.3%      +8  +0.3%      +8    Binding Info
  -2.3%      -8  -2.3%      -8    __DATA,__objc_classlist
  -1.2%     -12  -1.2%     -12    __DATA,__objc_ivar
  -0.9%     -16  -0.9%     -16    Function Start Addresses
  -1.8%     -16  -1.8%     -16    [2 Others]
  -0.5%     -16  -0.5%     -16    __TEXT,__unwind_info
  -1.7%     -19  -1.7%     -19    __TEXT,__objc_classname
  -1.7%     -32  -1.7%     -32    Rebase Info
  -0.2%     -32  -0.2%     -32    __DATA,__cfstring
  -0.6%     -40  -0.6%     -40    __DATA,__objc_selrefs
  -2.4%     -67  -2.4%     -67    __TEXT,__objc_methtype
  -2.3%     -80  -2.3%     -80    __DATA,__objc_data
  -0.5%     -94  -0.5%     -94    __TEXT,__cstring
  -1.0%    -266  -1.0%    -266    __TEXT,__objc_methname
  -1.3%    -648  -1.3%    -648    __DATA,__objc_const
  -0.9% -1.20Ki  -0.9% -1.20Ki    Symbol Table
  -0.5% -1.29Ki  -0.5% -1.29Ki    __TEXT,__text
  -1.0% -1.77Ki  -1.0% -1.77Ki    String Table
  -0.4% -3.02Ki  [ = ]       0    TOTAL

Generated by 🚫 Danger

@@ -46,8 +46,6 @@ NS_ASSUME_NONNULL_BEGIN

@property (readonly, nonatomic) BOOL shouldSendReports;

@property (readonly, nonatomic) NSDictionary<NSString *, id> *sessionApiHeaders;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@nickdowell nickdowell merged commit 287d1e9 into next Aug 8, 2022
@nickdowell nickdowell deleted the nickdowell/api-client branch August 8, 2022 12:22
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