class ElasticAPM::Transport::Connection::ProxyPipe::Write

def write(str)

def write(str)
  io.puts(str).tap do
    @bytes_sent.update do |curr|
      @compress ? io.tell : curr + str.bytesize
    end
  end
end