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

NDK JSON Event Writer #2027

Merged
merged 14 commits into from
May 22, 2024
Merged

NDK JSON Event Writer #2027

merged 14 commits into from
May 22, 2024

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented May 15, 2024

Goal

Replace the binary event writer with a signal-safe JSON encoder.

Design

Using the same JSON encoder we use in bugsnag-cocoa our signal handler now dumps the event state directly as JSON, allowing more flexibility in the in-memory event model.

The native events are still written to the native directory since the discardClasses cannot be evaluated during the crash. Instead a new ReportDiscardScanner class will evaluate discardClasses and enabledReleaseStages on delivery, using a JsonReader to allow early-exit when either:

  • the event should discarded, or
  • both the event classes, and release stage have been checked

Testing

Relied on existing tests, with a simple unit test to ensure that legacy native events are discarded.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented May 15, 2024

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1844.42 1668.69
arm64_v8a 626.95 450.82
armeabi_v7a 561.42 385.29
x86 700.66 524.53
x86_64 671.99 495.86

Generated by 🚫 Danger

@lemnik lemnik requested a review from kstenerud May 22, 2024 07:53
@lemnik lemnik merged commit 308c95f into next May 22, 2024
25 checks passed
@lemnik lemnik deleted the PLAT-12009/json-event branch May 22, 2024 09:00
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.

None yet

4 participants