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

Filter structs in MapFilter #507

Merged
merged 5 commits into from Sep 26, 2019
Merged

Filter structs in MapFilter #507

merged 5 commits into from Sep 26, 2019

Conversation

jeffkreeftmeijer
Copy link
Member

The MapFilter is used to filter parameters and session data before sending it to AppSignal. Currently, it filters nested maps and lists. Structs aren't generally found in parameter maps, unless a plug adds them when parsing the parameters. We've seen this in the open_api_spex library, where it's not an issue as the extracted parameter struct isn't actually added to the params map.

However, since it makes sense to properly filter structs if they end up in the parameters, this patch adds struct filtering by converting both maps and stucts to lists, and then filtering those.

It also includes a general cleanup in the tests for MapFilter, which is contained in c7de233 and includes no structural changes.

Copy link
Member

@tombruijn tombruijn 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 the change look ok

@tombruijn
Copy link
Member

@jeffkreeftmeijer good to merge?

@jeffkreeftmeijer jeffkreeftmeijer merged commit 98fb045 into develop Sep 26, 2019
@jeffkreeftmeijer jeffkreeftmeijer deleted the struct-filtering branch September 26, 2019 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants