Skip to content

Conversation

@jscottnz
Copy link

@jscottnz jscottnz commented Jul 19, 2018

This PR adds data filtering ( inspired by #31 )

While the ability to filter messages has been available for sometime with a roll your own implementation of RaygunOnBeforeSend, this PR adds some out of the box implementations:

  • RaygunRequestQueryStringFilter to filter out query string values
  • RaygunRequestHeaderFilter to filter out header values
  • RaygunRequestFormFilter to filter out form values

ie.

RaygunClient.SetOnBeforeSend(new RaygunRequestFormFilter("form1", "form2"));

And the bonus: RaygunOnBeforeSendChain which allows specifying a set of RaygunOnBeforeSend handlers:

RaygunClient.SetOnBeforeSend(new RaygunOnBeforeSendChain()
     .filterWith(new RaygunRequestQueryStringFilter("queryParam1", "queryParam2").replaceWith("*REDACTED*"))
     .filterWith(new RaygunRequestHeaderFilter("header1", "header2"))
     .filterWith(new RaygunRequestFormFilter("form1", "form2"))

@mduncan26
Copy link

LGTM

@jscottnz jscottnz merged commit ead300f into master Jul 19, 2018
@jscottnz jscottnz deleted the servlet-message-handling branch July 19, 2018 20:57
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.

3 participants