[PLAT-8292] Fix duplication of app and device data in session payloads #1332
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.
Goal
Stop
app
anddevice
from being included inside thesession
JSON object in addition to being in the top-level payload sent tosessions.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.