class Excon::Connection
Public Class Methods
install_mmtrix_instrumentation()
click to toggle source
# File lib/mmtrix/agent/instrumentation/excon/connection.rb, line 28 def self.install_mmtrix_instrumentation alias request_without_mmtrix_trace request alias request request_with_mmtrix_trace end
Public Instance Methods
mmtrix_connection_params()
click to toggle source
# File lib/mmtrix/agent/instrumentation/excon/connection.rb, line 7 def mmtrix_connection_params (@connection || @data) end
mmtrix_resolved_request_params(request_params)
click to toggle source
# File lib/mmtrix/agent/instrumentation/excon/connection.rb, line 11 def mmtrix_resolved_request_params(request_params) resolved = mmtrix_connection_params.merge(request_params) resolved[:headers] = resolved[:headers].merge(request_params[:headers] || {}) resolved end
request_with_mmtrix_trace(params, &block)
click to toggle source
# File lib/mmtrix/agent/instrumentation/excon/connection.rb, line 17 def request_with_mmtrix_trace(params, &block) orig_response = nil resolved_params = mmtrix_resolved_request_params(params) wrapped_request = ::Mmtrix::Agent::HTTPClients::ExconHTTPRequest.new(resolved_params) ::Mmtrix::Agent::CrossAppTracing.tl_trace_http_request(wrapped_request) do orig_response = request_without_mmtrix_trace(resolved_params, &block) ::Mmtrix::Agent::HTTPClients::ExconHTTPResponse.new(orig_response) end orig_response end