Module: IoMonitor::NetHttpAdapterPatch

Defined in:
lib/io_monitor/patches/net_http_adapter_patch.rb

Instance Method Summary collapse

Instance Method Details

#request(*args, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/io_monitor/patches/net_http_adapter_patch.rb', line 5

def request(*args, &block)
  super do |response|
    if response.body && IoMonitor.aggregator.active?
      IoMonitor.aggregator.increment(NetHttpAdapter.kind, response.body.bytesize)
    end
  end
end