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

Improved EventPayload for Delivery #2092

Merged
merged 10 commits into from
Oct 29, 2024
Merged

Improved EventPayload for Delivery #2092

merged 10 commits into from
Oct 29, 2024

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Oct 23, 2024

Goal

Make it easier to build new Delivery implementations without requiring the use of internal classes.

Design

Updated the EventPayload class to have the trimming logic and integrity-header generation.

Changeset

EventPayload and Session both now include a toByteArray() function that will encode them in JSON suitable for direct delivery over HTTP.

EventPayload also includes the calculations for the Bugsnag-Integrity header, and the payload trimming logic that was previously in DefaultDelivery

A new OkHttpDelivery implementation of Delivery has been added to the bugsnag-plugin-android-okhttp module, allowing for the reuse of externally configured OkHttpClients to be used for delivery of sessions and events.

Testing

New end to end scenario

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Oct 23, 2024

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1855.95 1675.41
arm64_v8a 635.14 450.82
armeabi_v7a 569.61 385.29
x86 708.85 528.62
x86_64 680.18 495.86

Generated by 🚫 Danger

@lemnik lemnik force-pushed the PLAT-12835/improved-delivery branch from 997be71 to c6c8745 Compare October 24, 2024 07:59
Copy link
Contributor

@YYChen01988 YYChen01988 left a comment

Choose a reason for hiding this comment

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

LGTM

@lemnik lemnik force-pushed the PLAT-12835/improved-delivery branch from 4387507 to f2a0afa Compare October 29, 2024 13:18
@lemnik lemnik merged commit 80fd618 into next Oct 29, 2024
34 checks passed
@lemnik lemnik deleted the PLAT-12835/improved-delivery branch October 29, 2024 13:40
@YYChen01988 YYChen01988 mentioned this pull request Oct 29, 2024
@YYChen01988 YYChen01988 mentioned this pull request Nov 7, 2024
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.

4 participants