-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use structured logging #289
Comments
I have this insane |
The idea sounds fine to me. Thanks for contribution. |
@peter-edge I guess that could be 1 implementation among many, my idea here is to use a structured logging interface instead of printf-logging. The backing implementation isn't really something important to me =P. |
I prepared this deck about why structured logging matters, could help motivate why we'd like to see GRPC use it somehow: https://docs.google.com/presentation/d/1SnjZpcfJq9r6OpgsjsX9ExCFTQgpXsSjD--Y3PPDiAQ/edit?usp=sharing It's a bit annoying that a library be logging on it's own, with its own means. At least logging to key-values would leave the choice to users to |
Sounds good, this may make a good gRFC proposal. I'll defer to @dfawley though |
We're open to this idea, but we would like to see a design proposal first (either as a grfc or a write-up in this bug), and would need a contribution to implement it as well. |
Closing due to lack of activity and priority. |
This package emits a lot of logs when it encounters errors. It would be nice if the logging could be done in a structured manner, so that machine be able to parse them and make sense of the various piece of information found in them.
For instance, at DigitalOcean we log everything in JSON and send all the logs to a centralized store, where we can perform query and analyse our logs in bulk. We structure our logs in a manner such that this log entry:
Prints something like:
We can then run queries about the most frequent errors involving
peer.addr = "some address"
.So essentially I'm proposing modifying
grpc-go/grpclog
to match another interface, and then modifying all log sites to leverage structured logging patterns. There's a standard structured logger coming up in the community:If you're interested, I could work on a patch.
The text was updated successfully, but these errors were encountered: