Sha256: 42900cd0e3447be16161fd38e1ac2b1fecd985a9a5b4ebc07c1a735cb080ece4

Contents?: true

Size: 517 Bytes

Versions: 110

Compression:

Stored size: 517 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.send(:prepend, Appsignal::Integrations::NetHttpIntegration)

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

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
appsignal-3.0.11-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.11 lib/appsignal/hooks/net_http.rb
appsignal-3.0.10-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.10 lib/appsignal/hooks/net_http.rb
appsignal-3.0.9-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.9 lib/appsignal/hooks/net_http.rb
appsignal-3.0.8-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.8 lib/appsignal/hooks/net_http.rb
appsignal-3.0.7-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.7 lib/appsignal/hooks/net_http.rb
appsignal-3.0.6-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.6 lib/appsignal/hooks/net_http.rb
appsignal-3.0.5-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.5 lib/appsignal/hooks/net_http.rb
appsignal-3.0.4-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.4 lib/appsignal/hooks/net_http.rb
appsignal-3.0.4.alpha.1-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.4.alpha.1 lib/appsignal/hooks/net_http.rb
appsignal-3.0.3-java lib/appsignal/hooks/net_http.rb
appsignal-3.0.3 lib/appsignal/hooks/net_http.rb