Sha256: 0e72148912e281b9e601eb4e17de7bb790449264c3f7a68aadfd135db72616d6

Contents?: true

Size: 846 Bytes

Versions: 19

Compression:

Stored size: 846 Bytes

Contents

require_relative '../integration'

require_relative 'patcher'
require_relative 'request_middleware'

module Datadog
  module AppSec
    module Contrib
      module Sinatra
        # Description of Sinatra integration
        class Integration
          include Datadog::AppSec::Contrib::Integration

          MINIMUM_VERSION = Gem::Version.new('1.4.0')

          register_as :sinatra

          def self.version
            Gem.loaded_specs['sinatra'] && Gem.loaded_specs['sinatra'].version
          end

          def self.loaded?
            !defined?(::Sinatra).nil?
          end

          def self.compatible?
            super && version >= MINIMUM_VERSION
          end

          def self.auto_instrument?
            true
          end

          def patcher
            Patcher
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ddtrace-1.23.3 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.23.2 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.23.1 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.22.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.21.1 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.21.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.20.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.19.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.18.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.17.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.16.2 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.16.1 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.16.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.15.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.14.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.13.1 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.13.0 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.12.1 lib/datadog/appsec/contrib/sinatra/integration.rb
ddtrace-1.12.0 lib/datadog/appsec/contrib/sinatra/integration.rb