Module: Sidekiq::Instrumental
- Defined in:
- lib/sidekiq/instrumental.rb,
lib/sidekiq/instrumental/version.rb,
lib/sidekiq/instrumental/configuration.rb,
lib/sidekiq/instrumental/middleware/base.rb,
lib/sidekiq/instrumental/middleware/client.rb,
lib/sidekiq/instrumental/middleware/server.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Middleware Classes: Configuration
Constant Summary collapse
- VERSION =
'0.3.4'
Class Method Summary collapse
Class Method Details
.config ⇒ Object
12 13 14 |
# File 'lib/sidekiq/instrumental.rb', line 12 def self.config @config ||= Sidekiq::Instrumental::Configuration.new end |
.configure {|config| ... } ⇒ Object
16 17 18 19 |
# File 'lib/sidekiq/instrumental.rb', line 16 def self.configure yield config if block_given? register end |
.register ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/sidekiq/instrumental.rb', line 21 def self.register new_config = config.dup ::Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.remove Sidekiq::Instrumental::Middleware::Server chain.add Sidekiq::Instrumental::Middleware::Server, new_config end config.client_middleware do |chain| chain.remove Sidekiq::Instrumental::Middleware::Client chain.add Sidekiq::Instrumental::Middleware::Client, new_config end end ::Sidekiq.configure_client do |config| config.client_middleware do |chain| chain.remove Sidekiq::Instrumental::Middleware::Client chain.add Sidekiq::Instrumental::Middleware::Client, new_config end end end |