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-3.8.1-java lib/appsignal/hooks/net_http.rb
appsignal-3.8.1 lib/appsignal/hooks/net_http.rb
appsignal-3.8.0-java lib/appsignal/hooks/net_http.rb
appsignal-3.8.0 lib/appsignal/hooks/net_http.rb
appsignal-3.7.6-java lib/appsignal/hooks/net_http.rb
appsignal-3.7.6 lib/appsignal/hooks/net_http.rb
appsignal-3.7.2-java lib/appsignal/hooks/net_http.rb
appsignal-3.7.2 lib/appsignal/hooks/net_http.rb
appsignal-3.7.1-java lib/appsignal/hooks/net_http.rb
appsignal-3.7.1 lib/appsignal/hooks/net_http.rb
appsignal-3.7.0-java lib/appsignal/hooks/net_http.rb
appsignal-3.7.0 lib/appsignal/hooks/net_http.rb
appsignal-3.6.5-java lib/appsignal/hooks/net_http.rb
appsignal-3.6.5 lib/appsignal/hooks/net_http.rb
appsignal-3.6.4-java lib/appsignal/hooks/net_http.rb
appsignal-3.6.4 lib/appsignal/hooks/net_http.rb
appsignal-3.6.3-java lib/appsignal/hooks/net_http.rb
appsignal-3.6.3 lib/appsignal/hooks/net_http.rb
appsignal-3.6.2-java lib/appsignal/hooks/net_http.rb
appsignal-3.6.2 lib/appsignal/hooks/net_http.rb