Sha256: f19276aabf31654dae4722d6988d26d71ba612c83301e8bc505ff8bf4f28a203

Contents?: true

Size: 664 Bytes

Versions: 6

Compression:

Stored size: 664 Bytes

Contents

require 'ddtrace/contrib/patcher'
require 'ddtrace/contrib/active_support/cache/patcher'

module Datadog
  module Contrib
    module ActiveSupport
      # Patcher enables patching of 'active_support' module.
      module Patcher
        include Contrib::Patcher

        module_function

        def patched?
          done?(:active_support)
        end

        def patch
          do_once(:active_support) do
            begin
              Cache::Patcher.patch
            rescue StandardError => e
              Datadog::Tracer.log.error("Unable to apply Active Support integration: #{e}")
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ls-trace-0.1.2 lib/ddtrace/contrib/active_support/patcher.rb
ddtrace-0.29.1 lib/ddtrace/contrib/active_support/patcher.rb
ls-trace-0.1.1 lib/ddtrace/contrib/active_support/patcher.rb
ddtrace-0.29.0 lib/ddtrace/contrib/active_support/patcher.rb
ddtrace-0.28.0 lib/ddtrace/contrib/active_support/patcher.rb
ddtrace-0.27.0 lib/ddtrace/contrib/active_support/patcher.rb