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.