Module: Elastics::Instrumentation::ActiveSupport

Defined in:
lib/elastics/instrumentation/active_support.rb

Defined Under Namespace

Modules: Ruby19Fallback Classes: LogSubscriber

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.installObject



9
10
11
12
13
14
15
16
# File 'lib/elastics/instrumentation/active_support.rb', line 9

def install
  if Client.respond_to?(:prepend)
    Client.prepend self
  else
    Client.send :include, Ruby19Fallback
  end
  LogSubscriber.attach_to :elastics
end

Instance Method Details

#http_request(*args) ⇒ Object



19
20
21
22
23
# File 'lib/elastics/instrumentation/active_support.rb', line 19

def http_request(*args)
  ::ActiveSupport::Notifications.instrument 'http_request.elastics', args: args do
    super
  end
end