Currently the tracing middleware only captures the gRPC status code when extracting the error out of a http response. Besides the code, gRPC also requires a human-readable message for error handling, and it'll be useful in this message is extracted from the response as well.
Solution
Per gRPC over HTTP/2 Protocol, a percent-encoded message is included in grpc-message field in the response header / trailer. So this PR also extracts this value and include it in the extracted GrpcFailureClass, such that the downstream usages can use this message for tracing.
Motivation
Currently the tracing middleware only captures the gRPC status code when extracting the error out of a http response. Besides the code, gRPC also requires a human-readable message for error handling, and it'll be useful in this message is extracted from the response as well.
Solution
Per gRPC over HTTP/2 Protocol, a percent-encoded message is included in
grpc-message
field in the response header / trailer. So this PR also extracts this value and include it in the extractedGrpcFailureClass
, such that the downstream usages can use this message for tracing.