Class: Reporters::ActiveSupportReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_logging/reporters/active_support_reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(instrumentation_key) ⇒ ActiveSupportReporter

Returns a new instance of ActiveSupportReporter.



3
4
5
# File 'lib/grape_logging/reporters/active_support_reporter.rb', line 3

def initialize(instrumentation_key)
  @instrumentation_key = instrumentation_key
end

Instance Method Details

#perform(params) ⇒ Object



7
8
9
# File 'lib/grape_logging/reporters/active_support_reporter.rb', line 7

def perform(params)
  ActiveSupport::Notifications.instrument @instrumentation_key, params
end