Sha256: b35c09997e1dd2872451853744c53f304e65225dd97a710a16f0c8dce699b9d0

Contents?: true

Size: 537 Bytes

Versions: 10

Compression:

Stored size: 537 Bytes

Contents

require 'ddtrace/contrib/patcher'

module Datadog
  module Contrib
    module Sinatra
      # Patcher enables patching of 'sinatra' module.
      module Patcher
        include Contrib::Patcher

        module_function

        def target_version
          Integration.version
        end

        def patch
          require 'ddtrace/contrib/sinatra/tracer'
          register_tracer
        end

        def register_tracer
          ::Sinatra.send(:register, Datadog::Contrib::Sinatra::Tracer)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ddtrace-0.34.2 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.34.1 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.34.0 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.33.1 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.33.0 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.32.0 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.31.1 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.31.0 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.30.1 lib/ddtrace/contrib/sinatra/patcher.rb
ddtrace-0.30.0 lib/ddtrace/contrib/sinatra/patcher.rb