Skip to content

ssh: Track amount of processed bytes

Pavlo Strokov requested to merge ps-ssh-bytes-transmitted into master

The streamio package is used to work with streaming gRPC methods. It provides a wrappers that allow to receive and send data from/to gRPC channel if it is io.Reader or io.Writer. The change adds Total method that allows to get amount of bytes that were processed by the wrapper.

Log info about amount of bytes received and send back by the RPCs: SSHReceivePack, SSHUploadArchive, SSHUploadPack. The amount of received bytes is logged under 'in_bytes' field and 'out_bytes' is used for amount of bytes send back. The log entry can be found by 'processing details' message. The calculation is done by the wrappers that help to adopt gRPC stream to io interfaces.

Closes: #3867 (closed)

Merge request reports