Module: NSA::Statsd::Informant
- Extended by:
- Subscriber
- Defined in:
- lib/nsa/statsd/informant.rb
Constant Summary collapse
- COLLECTOR_TYPES =
::Hash.new(::NSA::Collectors::Null).merge({ :action_controller => ::NSA::Collectors::ActionController, :active_record => ::NSA::Collectors::ActiveRecord, :active_support_cache => ::NSA::Collectors::ActiveSupportCache, :sidekiq => ::NSA::Collectors::Sidekiq }).freeze
Constants included from Subscriber
Subscriber::EXPECTED_RESPONDABLE_METHODS
Class Method Summary collapse
Methods included from Subscriber
__send_event_to_statsd, backend_valid?, statsd_subscribe
Class Method Details
.collect(collector, key_prefix) ⇒ Object
19 20 21 22 |
# File 'lib/nsa/statsd/informant.rb', line 19 def self.collect(collector, key_prefix) collector = COLLECTOR_TYPES[collector.to_sym] unless collector.respond_to?(:collect) collector.collect(key_prefix) end |
.listen(backend) ⇒ Object
24 25 26 |
# File 'lib/nsa/statsd/informant.rb', line 24 def self.listen(backend) statsd_subscribe(backend) end |