languages / ruby / configuration / silence-noisy-requests

Ruby Configuration - Silence Noisy Requests

Silencing noisy requests can be helpful for silencing load balance health checks, bot scanning, or activity that generally is not meaningful to you.

How to use it

The following will silence all [GET] /_health requests:

1
2
3
4
5
6
7
# config/initializers/timber.rb

Timber.config.integrations.rack.http_events.silence_request = lambda do |rack_env, rack_request|
  # rack_request.path returns a string *without* the query string.
  # The request of the lambda must be a boolean
  rack_request.path == "/_health"
end

We require a block because it gives you complete control over how you want to silence requests. The first parameter being the traditional Rack env hash, the second being a Rack Request object. Use any of this data to intelligently silence logging requests.

Questions?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up