Sha256: 76f7ebc4f2b99811d621b24b3642b44aaf944152a35ea31cea18efea72a34504
Contents?: true
Size: 1017 Bytes
Versions: 39
Compression:
Stored size: 1017 Bytes
Contents
# encoding: utf-8 LibraryDetection.defer do named :net_http depends_on do defined?(Net) && defined?(Net::HTTP) end executes do OneApm::Manager.logger.info 'Installing Net instrumentation' require 'one_apm/agent/cross_app/cross_app_tracing' require 'one_apm/support/http_clients/net_http_wrappers' end executes do class Net::HTTP def request_with_oneapm_trace(request, *args, &block) wrapped_request = OneApm::Support::HTTPClients::NetHTTPRequest.new(self, request) OneApm::Agent::CrossAppTracing.tl_trace_http_request( wrapped_request ) do # RUBY-1244 Disable further tracing in request to avoid double # counting if connection wasn't started (which calls request again). OneApm::Manager.disable_all_tracing do request_without_oneapm_trace( request, *args, &block ) end end end alias request_without_oneapm_trace request alias request request_with_oneapm_trace end end end
Version data entries
39 entries across 39 versions & 1 rubygems