Class: Nightwing::Sidekiq::Stats
- Defined in:
- lib/nightwing/sidekiq/stats.rb
Overview
Sidekiq server middleware for measuring Sidekiq stats
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(_worker, _msg, _queue) ⇒ Object
Sends Sidekiq metrics to statsd client then yields.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Nightwing::Sidekiq::Base
Instance Method Details
#call(_worker, _msg, _queue) ⇒ Object
Sends Sidekiq metrics to statsd client then yields
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/nightwing/sidekiq/stats.rb', line 19 def call(_worker, _msg, _queue) client.measure "#{namespace}.retries", retries.size client.measure "#{namespace}.scheduled", scheduled.size client.increment "#{namespace}.processed" begin yield rescue client.increment "#{namespace}.failed" raise end end |