Closed noma4i closed 11 months ago
Thanks @noma4i. @jgraichen could you take a look at this, please? Ref #24
Thank you, @noma4i and @leshik!
Would it be an option for you to generalize that into a exclude:
argument that takes a lambda as an argument so that this gem doesn't need to know about paths?
For example:
# Return `true` to skip the metric point for this request
my_filter = lambda { |env|
req = Rack::Request.new(env)
req.path =~ %r{^/(health|metric)} || req.params['admin'] == '1'
}
use ::Telegraf::Rack.new(series: 'rack', agent: agent, tags: {global: 'tag'}, exclude: my_filter)
You wouldn't be limited to path filters only and the gem wouldn't need an update to support other filters.
It looks too explicit for rails.
This gem (and especially this config) isn't focused on Rails.
This gem is very less code to support.
@noma4i I haven't had enough time to review again in the last few days, sorry!
Are you no longer interested in pursuing this merge request?
WoW that was fast. This PR was closed so fast that I was not able to fix anything. Just wow.
@noma4i You closed the PR yourself last week. That's why I was asking. :grin:
Main reason we need to exclude paths is the crazy amount of health checks or metrics flooding telegraf. Option for
exclude_paths
will prevent reporting on that endpoints