module HTTPX::Plugins::Tracing::ConnectionMethods

  1. lib/httpx/plugins/tracing.rb

Connection mixin

Methods

Public Class

  1. new

Public Instance

  1. idling
  2. send_request_to_parser

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/tracing.rb
108 def initialize(*)
109   super
110 
111   @init_time = ::Time.now.utc
112 end

Public Instance methods

idling()
[show source]
    # File lib/httpx/plugins/tracing.rb
123 def idling
124   super
125 
126   # time of initial request(s) is accounted from the moment
127   # the connection is back to :idle, and ready to connect again.
128   @init_time = ::Time.now.utc
129 end
send_request_to_parser(request)
[show source]
    # File lib/httpx/plugins/tracing.rb
114 def send_request_to_parser(request)
115   if connecting?
116     # request span timeframe should include the time it took to connect.
117     request.init_time ||= @init_time
118   end
119 
120   super
121 end