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

refactor: Filter breadcrumbs through type selection #476

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

kattrali
Copy link
Contributor

Goal

Allow filtering which breadcrumbs are captured using the breadcrumb type field

Design

  • Adds a new config option, enabledBreadcrumbTypes. Types can be turned off or on by modifying this property.
config.enabledBreadcrumbTypes = [.error, .log]
config.enabledBreadcrumbTypes = BSGEnabledBreadcrumbTypeError | BSGEnabledBreadcrumbTypeLog;

Subsequent calls to leaveBreadcrumb are then ignored or create breadcrumbs based on the type.

Tests

  • Added new unit-level tests for the breadcrumb filtering functions and default values
  • Added an integration test for the correct behavior when calling Bugsnag.leaveBreadcrumb()

Comment on lines +19 to +20
breadcrumbs from being captured.

Copy link
Contributor

@robinmacharg robinmacharg Mar 2, 2020

Choose a reason for hiding this comment

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

Suggested change
breadcrumbs from being captured.
breadcrumbs from being captured.
[#476](https://github.com/bugsnag/bugsnag-cocoa/pull/476)

Copy link
Contributor

@robinmacharg robinmacharg left a comment

Choose a reason for hiding this comment

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

LGTM. Just added in the PR details to the changelog.

# Conflicts:
#	Source/BugsnagConfiguration.m
#	Tests/BugsnagBreadcrumbsTest.m
#	UPGRADING.md
@robinmacharg robinmacharg merged commit 60228c3 into spec-compliance Mar 5, 2020
@robinmacharg robinmacharg deleted the kattrali/enabled-breadcrumb-types branch March 5, 2020 15:47
robinmacharg added a commit that referenced this pull request Mar 5, 2020
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