Sha256: c4fdccd7eeec7e04f36848f42cf2cacdf177360f9c6a1493545f45fbc6a3e181
Contents?: true
Size: 800 Bytes
Versions: 30
Compression:
Stored size: 800 Bytes
Contents
require 'net/http' module Appsignal class Hooks class NetHttpHook < Appsignal::Hooks::Hook register :net_http def dependencies_present? Appsignal.config[:instrument_net_http] end def install Net::HTTP.class_eval do alias request_without_appsignal request def request(request, body=nil, &block) ActiveSupport::Notifications.instrument( 'request.net_http', :protocol => use_ssl? ? 'https' : 'http', :domain => request['host'] || self.address, :path => request.path, :method => request.method ) do request_without_appsignal(request, body, &block) end end end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems