Sha256: aa730d6b7a4fdeb8fa1eb9b902ad2735f33b6c12a9c2aaceee859da4b3d223fe

Contents?: true

Size: 509 Bytes

Versions: 150

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

require "net/http"

module Appsignal
  class Hooks
    # @api private
    class NetHttpHook < Appsignal::Hooks::Hook
      register :net_http

      def dependencies_present?
        Appsignal.config && Appsignal.config[:instrument_net_http]
      end

      def install
        require "appsignal/integrations/net_http"
        Net::HTTP.prepend Appsignal::Integrations::NetHttpIntegration

        Appsignal::Environment.report_enabled("net_http")
      end
    end
  end
end

Version data entries

150 entries across 150 versions & 1 rubygems

Version Path
appsignal-4.3.3-java lib/appsignal/hooks/net_http.rb
appsignal-4.3.3 lib/appsignal/hooks/net_http.rb
appsignal-4.3.2-java lib/appsignal/hooks/net_http.rb
appsignal-4.3.2 lib/appsignal/hooks/net_http.rb
appsignal-4.3.1-java lib/appsignal/hooks/net_http.rb
appsignal-4.3.1 lib/appsignal/hooks/net_http.rb
appsignal-4.3.0-java lib/appsignal/hooks/net_http.rb
appsignal-4.3.0 lib/appsignal/hooks/net_http.rb
appsignal-4.2.3-java lib/appsignal/hooks/net_http.rb
appsignal-4.2.3 lib/appsignal/hooks/net_http.rb
appsignal-4.2.2-java lib/appsignal/hooks/net_http.rb
appsignal-4.2.2 lib/appsignal/hooks/net_http.rb
appsignal-4.2.1-java lib/appsignal/hooks/net_http.rb
appsignal-4.2.1 lib/appsignal/hooks/net_http.rb
appsignal-4.2.0-java lib/appsignal/hooks/net_http.rb
appsignal-4.2.0 lib/appsignal/hooks/net_http.rb
appsignal-4.1.3-java lib/appsignal/hooks/net_http.rb
appsignal-4.1.3 lib/appsignal/hooks/net_http.rb
appsignal-4.1.2-java lib/appsignal/hooks/net_http.rb
appsignal-4.1.2 lib/appsignal/hooks/net_http.rb