Module: BrainzLab::Instrumentation::SidekiqInstrumentation
- Defined in:
- lib/brainzlab/instrumentation/sidekiq.rb
Defined Under Namespace
Classes: ClientMiddleware, ServerMiddleware
Class Method Summary
collapse
Class Method Details
.install! ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/brainzlab/instrumentation/sidekiq.rb', line 9
def install!
return unless defined?(::Sidekiq)
return if @installed
::Sidekiq.configure_server do |config|
config.server_middleware do |chain|
chain.add ServerMiddleware
end
config.client_middleware do |chain|
chain.add ClientMiddleware
end
end
::Sidekiq.configure_client do |config|
config.client_middleware do |chain|
chain.add ClientMiddleware
end
end
@installed = true
BrainzLab.debug_log('Sidekiq instrumentation installed')
end
|
.installed? ⇒ Boolean
35
36
37
|
# File 'lib/brainzlab/instrumentation/sidekiq.rb', line 35
def installed?
@installed
end
|
.reset! ⇒ Object
39
40
41
|
# File 'lib/brainzlab/instrumentation/sidekiq.rb', line 39
def reset!
@installed = false
end
|