Module: HTTPX::Plugins::InternalTelemetry::ConnectionMethods

Defined in:
lib/httpx/plugins/internal_telemetry.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



103
104
105
106
# File 'lib/httpx/plugins/internal_telemetry.rb', line 103

def self.included(klass)
  klass.prepend TrackTimeMethods
  super
end

Instance Method Details

#handle_transition(nextstate) ⇒ Object



108
109
110
111
112
# File 'lib/httpx/plugins/internal_telemetry.rb', line 108

def handle_transition(nextstate)
  state = @state
  super
  meter_elapsed_time("Connection##{object_id}[#{@origin}]: #{state} -> #{nextstate}") if nextstate == @state
end