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

More open Event model #2060

Merged
merged 11 commits into from
Aug 6, 2024
Merged

Conversation

YYChen01988
Copy link
Contributor

@YYChen01988 YYChen01988 commented Jul 18, 2024

Goal

Open up more Event model APIs, that users can add new Errors, Threads, and leave breadcrumbs at an Event level.

Changeset

The Event class includes new methods to:

  • add a new Thread object to the Event
  • add a new Error object to the Event
  • leave additional Event level breadcrumbs

The Error and Thread classes include new methods to add Stackframes.

Testing

New unit tests added.

@YYChen01988 YYChen01988 requested a review from lemnik July 18, 2024 11:28
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Jul 18, 2024

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1852.98 1674.68
arm64_v8a 631.04 450.82
armeabi_v7a 565.51 385.29
x86 708.85 528.62
x86_64 676.09 495.86

Generated by 🚫 Danger

@YYChen01988 YYChen01988 force-pushed the PLAT-12376/add-items-in-Event-model-for-customers branch from dbbee19 to 3bf0021 Compare July 18, 2024 11:52
@YYChen01988 YYChen01988 force-pushed the PLAT-12376/add-items-in-Event-model-for-customers branch 2 times, most recently from 391a72c to 5586b35 Compare July 18, 2024 13:38
@YYChen01988 YYChen01988 requested a review from lemnik July 18, 2024 13:39
@YYChen01988 YYChen01988 force-pushed the PLAT-12376/add-items-in-Event-model-for-customers branch 2 times, most recently from 9677b14 to 334449d Compare July 18, 2024 13:58
@lemnik lemnik changed the title Plat 12376/add items in event model for customers More open Event model Jul 22, 2024
@lemnik lemnik requested a review from kstenerud August 5, 2024 11:44
@lemnik lemnik force-pushed the PLAT-12376/add-items-in-Event-model-for-customers branch from bd7f670 to 3b874f9 Compare August 5, 2024 11:49
@lemnik lemnik requested a review from kstenerud August 5, 2024 13:54
Copy link
Contributor

@tomlongridge tomlongridge left a comment

Choose a reason for hiding this comment

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

I think calling them events throughout is better than the word report as that matches our docs. But don't feel strongly if you have a better reason.

@@ -75,6 +75,35 @@ public List<Error> getErrors() {
return impl.getErrors();
}

/**
* Add a new error to this report and return its Error data. The new Error will appear at the
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Add a new error to this report and return its Error data. The new Error will appear at the
* Add a new error to this event and return its Error data. The new Error will appear at the

}

/**
* Add a new empty {@link ErrorType#ANDROID android} error to this report and return its Error
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Add a new empty {@link ErrorType#ANDROID android} error to this report and return its Error
* Add a new empty {@link ErrorType#ANDROID android} event to this report and return its Error

}

/**
* Add a new empty error to this report and return its Error data. The new Error will appear
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Add a new empty error to this report and return its Error data. The new Error will appear
* Add a new empty error to this event and return its Error data. The new Error will appear

Comment on lines 118 to 119
* and name. This can be used to augment the report with thread data that would not be picked
* up as part of a normal report being generated (for example: native threads managed
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* and name. This can be used to augment the report with thread data that would not be picked
* up as part of a normal report being generated (for example: native threads managed
* and name. This can be used to augment the event with thread data that would not be picked
* up as part of a normal event being generated (for example: native threads managed

Comment on lines 138 to 139
* and name. This can be used to augment the report with thread data that would not be picked
* up as part of a normal report being generated (for example: native threads managed
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* and name. This can be used to augment the report with thread data that would not be picked
* up as part of a normal report being generated (for example: native threads managed
* and name. This can be used to augment the event with thread data that would not be picked
* up as part of a normal event being generated (for example: native threads managed

CHANGELOG.md Outdated
@@ -6,6 +6,8 @@

* Include additional Intent information for Activity.onCreate breadcrumbs (action, categories, type, flags, id, extra keys)
[#2057](https://github.com/bugsnag/bugsnag-android/pull/2057)
* New APIs allowing new `Error`s, `Thread`s, and `Stackframe`s to be added to error reports (`Event`s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* New APIs allowing new `Error`s, `Thread`s, and `Stackframe`s to be added to error reports (`Event`s)
* New APIs allowing new `Error`s, `Thread`s, and `Stackframe`s to be added to `Event`s

Copy link
Contributor

@yousif-bugsnag yousif-bugsnag 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-12376/add-items-in-Event-model-for-customers branch from bbe0c08 to 08526ea Compare August 6, 2024 14:14
@lemnik lemnik merged commit 945c734 into next Aug 6, 2024
26 checks passed
@lemnik lemnik deleted the PLAT-12376/add-items-in-Event-model-for-customers branch August 6, 2024 15:33
@lemnik lemnik mentioned this pull request Aug 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.

6 participants