Sha256: 5910812778882a7791f3c952e23c83442f89853e073729072911fc8e40971d9c
Contents?: true
Size: 1016 Bytes
Versions: 42
Compression:
Stored size: 1016 Bytes
Contents
# encoding: utf-8 module ::Excon class Connection def oneapm_connection_params (@connection || @data) end def oneapm_resolved_request_params(request_params) resolved = oneapm_connection_params.merge(request_params) resolved[:headers] = resolved[:headers].merge(request_params[:headers] || {}) resolved end def request_with_oneapm_trace(params, &block) orig_response = nil resolved_params = oneapm_resolved_request_params(params) wrapped_request = ::OneApm::Support::HTTPClients::ExconHTTPRequest.new(resolved_params) ::OneApm::Agent::CrossAppTracing.tl_trace_http_request(wrapped_request) do orig_response = request_without_oneapm_trace(resolved_params, &block) ::OneApm::Support::HTTPClients::ExconHTTPResponse.new(orig_response) end orig_response end def self.install_oneapm_instrumentation alias request_without_oneapm_trace request alias request request_with_oneapm_trace end end end
Version data entries
42 entries across 42 versions & 1 rubygems