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



122
123
124
125
# File 'lib/httpx/plugins/internal_telemetry.rb', line 122

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

Instance Method Details

#handle_transition(nextstate) ⇒ Object



127
128
129
130
131
# File 'lib/httpx/plugins/internal_telemetry.rb', line 127

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