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

OnSend Callback Implementation #1524

Merged
merged 40 commits into from
Nov 26, 2021
Merged

OnSend Callback Implementation #1524

merged 40 commits into from
Nov 26, 2021

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Nov 24, 2021

Goal

Introduce OnSend Callbacks for next, allowing first-party plugins to intercept the delivery of an event, and alter the event payload before the upload. This is mostly based on previous work from integration/onsend-callback which targeted the Journal branch. This new branch is based on next and provides the same functionality there.

Testing

Deserialization of the events is covered by unit tests, leveraging the same test fixtures as the existing serialization tests. A new Mazeunner scenario has been added to ensure the process works when integrated into an application.

fractalwrench and others added 30 commits November 11, 2021 11:41
* feat(onsend): added the `OnSendCallback` interface and support functions

* feat(onsend): add dsl-json and encapsulate Event unmarsalling in EventSource
…onsend

Parse Stacktrace for OnSend Callbacks
…onsend

Parse DeviceWithState and AppWithState for OnSendCallbacks
…onsend

Parse Breadcrumbs for OnSend Callbacks
@lemnik lemnik requested a review from fractalwrench November 24, 2021 10:43
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM pending resolution of review comments

},

// threads included
createEvent {
it.addMetadata("app", "foo", 55)
it.addMetadata("device", "bar", true)
it.addMetadata("wham", "some_key", "A value")
it.addMetadata("wham", "some_key", "Avalue")
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be good to resolve issues with spacing in the JSON tests before merging

lemnik and others added 7 commits November 25, 2021 11:11
Update onsend-next to next and align tests
Since events begin being sent during start(), it would be inadvisable to
add a callback after configuration, as events may be mistakenly missed.
This method was not public anyhow.

[full ci]
@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1352.85 1168.01
arm64_v8a 483.72 299.4
armeabi -492.59 -21.55
armeabi_v7a 455.06 270.74
x86 520.57 340.35
x86_64 504.19 323.97

Generated by 🚫 Danger

lemnik and others added 3 commits November 26, 2021 10:56
# Conflicts:
#	bugsnag-android-core/src/main/java/com/bugsnag/android/Client.java
#	bugsnag-android-core/src/main/java/com/bugsnag/android/DeliveryDelegate.java
#	bugsnag-android-core/src/main/java/com/bugsnag/android/EventInternal.kt
#	bugsnag-android-core/src/test/java/com/bugsnag/android/DeliveryDelegateTest.kt
@lemnik lemnik merged commit 6d2d542 into next Nov 26, 2021
@kattrali kattrali deleted the integration/onsend-next branch June 30, 2022 09:03
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