roadrunner
roadrunner copied to clipboard
[💡 FEATURE REQUEST]: Including grpc error details in log messages
Plugin
GRPC
I have an idea!
Currently, returning non-OK google.rpc.Status will result in grpc plugin adding an error log message as:
{
"level": "error",
"ts": 1712134859763589452,
"logger": "grpc",
"msg": "method call was finished with error",
"error": "rpc error: code = InvalidArgument desc = Error message",
"method": "/package.name.v1.Service/MethodName",
"start": 1712134859741923363,
"elapsed": 0.021663065
}
Sometimes this is too generic as usually all the important details are in, well, details field.
It might be useful to also log details, except it's a repeated google.protobuf.Any, which will clutter the log message.
Unless we want to be strict, a possibly good consideration would be limiting output only to messages from "google/rpc/error_details.proto" (which is sort of a recommended and common way to structure grpc errors, anyway).