Track payload bytes for RPC
For each RPC call we gather common statistics such as start time under grpc.start_time
, duration under grpc.time_ms
logging fields, etc.
One of the missing metrics is a size of the payload. There are two payloads - received by service and sent back by the service for each RPC. This change covers that gap and enriches logs with grpc.request.payload_bytes
and grpc.response.payload_bytes
.
In order to add this extra info into the logging context the implementation of the logging was a bit changed and now should be more extensible.
As this info is logged for each RPC we don't need to cover each method separately by calculating data transmitted inside of the method itself, so it resolves #3867 (closed).
Closes: #3867 (closed)