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-7656] Send sessions without requiring disk storage #1246

Merged
merged 6 commits into from
Dec 2, 2021

Conversation

nickdowell
Copy link
Contributor

Goal

Allow sessions to be sent without persisting to disk first, and only persist if the sending fails.

This makes session sending more resilient in the face of a full file system, and improves performance by avoiding file I/O on the main / calling thread.

Changeset

The changes may make more sense when viewed as individual commits, due to the refactoring

  • Adds -uploadSession: to send the payload immediately and store to disk upon failure
  • Renames BugsnagSessionTrackingApiClient to BSGSessionUploader (due to the number of changes the diff shows this as an addition and removal, but some original logic remains)
  • Removes unused functionality from BugsnagApiClient
  • Replaces BugsnagSessionTrackingPayload with a dictionary literal that is much easier to understand

Testing

This functionality is covered by existing E2E tests - verified locally and on CI

@nickdowell nickdowell force-pushed the nickdowell/session-delivery branch from ad0a182 to 9ead29c Compare December 2, 2021 13:36
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size decreased by 21,688 bytes from 1,274,672 to 1,252,984 🎉

Generated by 🚫 Danger

@nickdowell nickdowell enabled auto-merge December 2, 2021 14:32
@nickdowell nickdowell merged commit 801e853 into next Dec 2, 2021
@nickdowell nickdowell deleted the nickdowell/session-delivery branch December 2, 2021 14:32
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