Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Add tests for the keyFilter feature & apply filter everywhere #62

Merged
merged 4 commits into from
Feb 26, 2020

Conversation

cweinberger
Copy link
Contributor

@cweinberger cweinberger commented Feb 26, 2020

CHANGELOG:

  • NEW: Headers are filtered out based on keyFilters
  • NEW: URL query params are filtered out based on keyFilters
  • NEW: Added tests for keyFilters feature

NOTE:

  • This PR does not change any API contracts
  • It changes the behaviour though

DISCUSSION:

  • We might add the ability to filter non-json-bodies as well (e.g. www-form-urlencoded)

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@98c6a17). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #62   +/-   ##
=========================================
  Coverage          ?   87.74%           
=========================================
  Files             ?        8           
  Lines             ?      204           
  Branches          ?        0           
=========================================
  Hits              ?      179           
  Misses            ?       25           
  Partials          ?        0
Impacted Files Coverage Δ
Sources/Bugsnag/BugsnagConfig.swift 100% <100%> (ø)
Sources/Bugsnag/Bugsnag.swift 97.91% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98c6a17...d2b5c47. Read the comment docs.

Copy link
Contributor

@siemensikkema siemensikkema left a comment

Choose a reason for hiding this comment

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

Looks good! Maybe one optimization could be to create a Set from filters and passing that into the different filtering steps. Doing .contains should be faster but maybe not worth it unless we expect large amounts of filters.

@cweinberger
Copy link
Contributor Author

Added the suggested change and also a brief introduction in the README.md

@cweinberger cweinberger merged commit 663a84f into master Feb 26, 2020
@cweinberger cweinberger deleted the feature/filter-headers branch February 26, 2020 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants