lib/ddtrace/contrib/grape/patcher.rb in ddtrace-0.29.1 vs lib/ddtrace/contrib/grape/patcher.rb in ddtrace-0.30.0

- old
+ new

@@ -12,27 +12,21 @@ module Patcher include Contrib::Patcher module_function - def patched? - done?(:grape) + def target_version + Integration.version end def patch - do_once(:grape) do - begin - # Patch endpoints - ::Grape::Endpoint.send(:include, Instrumentation) + # Patch endpoints + ::Grape::Endpoint.send(:include, Instrumentation) - add_pin! + add_pin! - # Subscribe to ActiveSupport events - Datadog::Contrib::Grape::Endpoint.subscribe - rescue StandardError => e - Datadog::Tracer.log.error("Unable to apply Grape integration: #{e}") - end - end + # Subscribe to ActiveSupport events + Datadog::Contrib::Grape::Endpoint.subscribe end def add_pin! # Attach a Pin object globally and set the service once pin = DeprecatedPin.new(