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

Add structured app/device fields to BugsnagSession #546

Merged
merged 3 commits into from
Apr 20, 2020
Merged

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Apr 17, 2020

Goal

Adds structured app/device fields to BugsnagSession and passes the structured session object into OnSessionCallback to allow users to modify/inspect the payload.

Changeset

  • Updated OnSessionCallback to take a BugsnagSession parameter rather than a dictionary
  • Updated BugsnagSessionTracker to generate a structured BugsnagSession object
  • Renamed session.sessionId to session.id
  • Add session.app and session.device
  • Make session.user conform to notifier spec with set method + getter
  • Add methods for serializing BugsnagSession to JSON
  • Add method for deserializing BugsnagSession from a cached payload
  • Update [BSG_KSSystemInfo systemInfo] to include memory information by default, to ensure device.totalMemory is populated for sessions
  • Updated SessionTrackingApiClient logic to avoid batching of session payloads, as the app/device information can now differ between individual sessions
  • Made BugsnagSession and BugsnagUser headers publicly accessible

Tests

  • Updated existing test coverage
  • Added new tests for serialization/deserialization of sessions
  • Verified that a BugsnagSession object is populated during a callback in the example app

@fractalwrench fractalwrench force-pushed the v6-session branch 2 times, most recently from 81ed41f to 0f6d0c0 Compare April 17, 2020 10:31
@fractalwrench fractalwrench marked this pull request as ready for review April 17, 2020 10:55
Copy link
Contributor

@robinmacharg robinmacharg left a comment

Choose a reason for hiding this comment

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

Big change set! LGTM.

@fractalwrench fractalwrench merged commit 8119d2f into v6 Apr 20, 2020
@fractalwrench fractalwrench deleted the v6-session branch April 20, 2020 12:59
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