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

Allow addition/removal of OnBreadcrumb callbacks #508

Merged
merged 3 commits into from
Mar 30, 2020
Merged

Conversation

fractalwrench
Copy link
Contributor

Goal

Provides a method for adding/removing callbacks which can mutate every Breadcrumb before it is added to the application. This matches the notifier specification.

Changeset

  • Added addOnBreadcrumbBlock and removeOnBreadcrumbBlock to Bugsnag and BugsnagConfiguration
  • Stored OnBreadcrumb callbacks in BugsnagBreadcrumbs
  • Executed callbacks before adding a breadcrumb and discarded the crumb if false is returned from any callback

Tests

Added new test coverage for adding/removing callbacks, and verifying that the callback discards/mutates breadcrumbs.

@fractalwrench fractalwrench merged commit 404e23d into v6 Mar 30, 2020
@fractalwrench fractalwrench deleted the v6-on-breadcrumb branch March 30, 2020 11:09
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