Module: Kenny
- Defined in:
- lib/kenny.rb,
lib/kenny/railtie.rb,
lib/kenny/log_subscriber.rb,
lib/kenny/formatters/log_stash_formatter.rb
Overview
This class is meant to be inherited by anonymous classes, created through Kenny.define_log_subscriber_class.
By inserting this class into the inheritance tree, we can verify in test-environment whether the LogSubscribers we created are indeed attached to the instrumentations we specified.
Defined Under Namespace
Modules: Formatters Classes: LogSubscriber, Railtie
Class Method Summary collapse
- .application ⇒ Object
- .application=(app) ⇒ Object
-
.attach_to_instrumentations ⇒ Object
Define LogSubscriber-classes and Attach to user-specified instrumentations if the configurations have been set.
- .configs ⇒ Object
Class Method Details
.application ⇒ Object
15 16 17 |
# File 'lib/kenny.rb', line 15 def self.application @application end |
.application=(app) ⇒ Object
11 12 13 |
# File 'lib/kenny.rb', line 11 def self.application=(app) @application = app end |
.attach_to_instrumentations ⇒ Object
Define LogSubscriber-classes and Attach to user-specified instrumentations if the configurations have been set.
22 23 24 25 26 27 28 |
# File 'lib/kenny.rb', line 22 def self.attach_to_instrumentations if @application.config.kenny[:instrumentations] @application.config.kenny[:instrumentations].each do |instr_config| define_log_subscriber_class(instr_config) end end end |
.configs ⇒ Object
7 8 9 |
# File 'lib/kenny.rb', line 7 def self.configs Struct.new(:instrumentations).new end |