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-8292] Fix duplication of app and device data in session payloads #1332

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Apr 7, 2022

Goal

Stop app and device from being included inside the session JSON object in addition to being in the top-level payload sent to sessions.bugsnag.com.

Changeset

Constructs the payload using a dictionary literal instead of -[BugsnagSession toJson] (which builds a payload suitable for when a session needs to be saved to disk.)

Prior to #1246 -[BugsnagSession toDictionary] was used - but that is also unsuitable for use here since it adds the unwanted "handledCount" and "unhandledCount" fields.

BugsnagSession has multiple serialization methods and it's not obvious where each should be used. A follow-up PR will refactor this to reduce the chance of similar bugs being introduced in the future.

Testing

Altered the E2E steps to very session payload keys for event and session payloads.

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

Bugsnag.framework binary size did not change - 857,752 bytes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +376  +0.1%    +376    __TEXT,__text
  -2.4%    -376  -2.4%    -376    [__TEXT]
  [ = ]       0  [ = ]       0    TOTAL

Generated by 🚫 Danger

@nickdowell nickdowell requested review from kattrali and kstenerud April 7, 2022 13:36
@nickdowell nickdowell merged commit 00da24a into next Apr 7, 2022
@nickdowell nickdowell deleted the nickdowell/fix-session-payloads branch April 7, 2022 15:13
@nickdowell nickdowell mentioned this pull request Apr 13, 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