apm-agent-ruby icon indicating copy to clipboard operation
apm-agent-ruby copied to clipboard

docs: Add example for payload filtering using callback

Open ammaar8 opened this issue 1 year ago • 1 comments

What does this pull request do?

This PR adds an example using a callback for filtering to showcase how to use a filter to ignore some payloads completely. Currently, there is no example on how to do this in the docs.

Also I haven't been able to check on 4.x but on 3.x If you try to return nil in the block it spams the logs with Failed converting event to JSON: logs.

Why is it important?

This provides an example for users like me looking to filter out some payloads completely. Also uses an example that would be popular with Rails users since the redis spans are a nuisance.

Checklist

  • [X] I have signed the Contributor License Agreement.
  • [X] My code follows the style guidelines of this project (See .rubocop.yml)
  • [X] I have rebased my changes on top of the latest main branch

~~- [ ] I have added tests that prove my fix is effective or that my feature works~~ ~~- [ ] New and existing unit tests pass locally with my changes~~

  • [X] I have made corresponding changes to the documentation

~~- [ ] I have updated CHANGELOG.asciidoc~~ ~~- [ ] I have updated supported-technologies.asciidoc~~ ~~- [ ] Added an API method or config option? Document in which version this will be introduced~~

ammaar8 avatar Mar 15 '24 14:03 ammaar8

💚 CLA has been signed