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

- old
+ new

@@ -7,22 +7,16 @@ module Patcher include Contrib::Patcher module_function - def patched? - done?(:sinatra) + def target_version + Integration.version end def patch - do_once(:sinatra) do - begin - require 'ddtrace/contrib/sinatra/tracer' - register_tracer - rescue StandardError => e - Datadog::Tracer.log.error("Unable to apply Sinatra integration: #{e}") - end - end + require 'ddtrace/contrib/sinatra/tracer' + register_tracer end def register_tracer ::Sinatra.send(:register, Datadog::Contrib::Sinatra::Tracer) end