Module: Strumbar
- Defined in:
- lib/strumbar.rb,
lib/strumbar/client.rb,
lib/strumbar/version.rb,
lib/strumbar/configuration.rb,
lib/strumbar/instrumentation.rb,
lib/strumbar/instrumentation/redis.rb,
lib/strumbar/instrumentation/mongoid.rb,
lib/strumbar/instrumentation/active_record.rb,
lib/strumbar/instrumentation/action_controller.rb,
lib/strumbar/instrumentation/mongoid/runtime_tracker.rb,
lib/strumbar/instrumentation/mongoid/controller_runtime.rb
Defined Under Namespace
Modules: Instrumentation
Classes: Client, Configuration, InstrumentList
Constant Summary
collapse
- VERSION =
"0.4.0"
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
18
19
20
|
# File 'lib/strumbar.rb', line 18
def client
@client ||= Client.new host, port
end
|
.configuration ⇒ Object
22
23
24
|
# File 'lib/strumbar.rb', line 22
def configuration
@configuration ||= Configuration.new
end
|
.strum(event, payload, &block) ⇒ Object
35
36
37
|
# File 'lib/strumbar.rb', line 35
def strum event, payload, &block
ActiveSupport::Notifications.instrument event, payload, &block
end
|
.subscribe(identifier) ⇒ Object
28
29
30
31
32
33
|
# File 'lib/strumbar.rb', line 28
def subscribe identifier
ActiveSupport::Notifications.subscribe identifier do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
yield client, event
end
end
|