Class: GrapeLogging::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.



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

def initialize(instrumentation_key)
  @instrumentation_key = instrumentation_key
end

Instance Method Details

#perform(params) ⇒ Object



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

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