Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃挕 FEATURE REQUEST]: Including grpc error details in log messages #1897

Open
rauanmayemir opened this issue Apr 3, 2024 · 0 comments
Open
Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate P-GRPC Plugins: GRPC

Comments

@rauanmayemir
Copy link

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).

@rauanmayemir rauanmayemir added the C-feature-request Category: feature requested, but need to be discussed label Apr 3, 2024
@rustatian rustatian added the P-GRPC Plugins: GRPC label Apr 3, 2024
@rustatian rustatian added the help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: feature requested, but need to be discussed help-heeded-medium Call for participation: Experience needed to fix: Medium / intermediate P-GRPC Plugins: GRPC
Projects
Status: 馃搵 Backlog
Development

No branches or pull requests

2 participants