Method: Datadog::Tracing::Contrib::Grape::Instrumentation::ClassMethods#generate_api_method

Defined in:
lib/datadog/tracing/contrib/grape/instrumentation.rb

#generate_api_method(*params, &block) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/datadog/tracing/contrib/grape/instrumentation.rb', line 16

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