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

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

Overview

ClassMethods - implementing instrumentation

Instance Method Summary collapse

Instance Method Details

#generate_api_method(*params, &block) ⇒ Object



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

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