Module: Datadog::Contrib::Grape::Instrumentation::ClassMethods

Defined in:
lib/ddtrace/contrib/grape/instrumentation.rb

Overview

ClassMethods - implementing instrumentation

Instance Method Summary collapse

Instance Method Details

#generate_api_method(*params, &block) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/ddtrace/contrib/grape/instrumentation.rb', line 13

def generate_api_method(*params, &block)
  method_api = super

  proc do |*args|
    ::ActiveSupport::Notifications.instrument('endpoint_render.grape.start_render')
    method_api.call(*args)
  end
end