Sha256: adb6e90d647833127f58fad135097f598faf56ccb6ee493fd8a14972ea90c919

Contents?: true

Size: 622 Bytes

Versions: 16

Compression:

Stored size: 622 Bytes

Contents

# typed: false

require 'sucker_punch'

module Datadog
  module Tracing
    module Contrib
      module SuckerPunch
        # Patches `sucker_punch` exception handling
        module ExceptionHandler
          METHOD = ->(e, *) { raise(e) }

          module_function

          def patch!
            ::SuckerPunch.singleton_class.class_eval do
              alias_method :__exception_handler, :exception_handler

              def exception_handler
                ::Datadog::Tracing::Contrib::SuckerPunch::ExceptionHandler::METHOD
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.8.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.7.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.6.1 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.6.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.5.2 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.5.1 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.5.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.4.2 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.4.1 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.4.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.3.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.2.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.1.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.0.0 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb
ddtrace-1.0.0.beta2 lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb