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.4.5-java lib/appsignal/hooks/net_http.rb
appsignal-3.4.5 lib/appsignal/hooks/net_http.rb
appsignal-3.4.4-java lib/appsignal/hooks/net_http.rb
appsignal-3.4.4 lib/appsignal/hooks/net_http.rb
appsignal-3.4.3-java lib/appsignal/hooks/net_http.rb
appsignal-3.4.3 lib/appsignal/hooks/net_http.rb
appsignal-3.4.2-java lib/appsignal/hooks/net_http.rb
appsignal-3.4.2 lib/appsignal/hooks/net_http.rb
appsignal-3.4.1-java lib/appsignal/hooks/net_http.rb
appsignal-3.4.1 lib/appsignal/hooks/net_http.rb