-
Notifications
You must be signed in to change notification settings - Fork 92
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
Make gRPC logging optional via a custom interface #299
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E.g. if the error is caused by overload, then we don't want to log it because that uses more resource. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Patterned after the one for http logging.
Http doesn't have access to the error that caused a failure, so it was an error to try to change behaviour on them.
It's not used now.
bboreham
changed the title
Make logging optional via a custom interface
Make gRPC logging optional via a custom interface
Jul 25, 2023
colega
approved these changes
Jul 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one small opinionated nit about naming.
colega
approved these changes
Jul 25, 2023
bboreham
added a commit
to grafana/mimir
that referenced
this pull request
Jul 25, 2023
Using weaveworks/common#299 which is a more flexible approach.
3 tasks
3 tasks
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
56quarters
added a commit
to grafana/mimir
that referenced
this pull request
Jul 27, 2023
This allows us to decorate them with extra information for gRPC responses and our logging middleware (to prevent them from being logged, increasing resource usage). Related #5581 Related weaveworks/common#299 Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
bboreham
added a commit
to grafana/mimir
that referenced
this pull request
Jul 28, 2023
Using weaveworks/common#299 which is a more flexible approach. Note the check disappeared from `logging.go`, because it was a mistake to check that error. It comes from `io.Writer`, it won't be an app- level error.
bboreham
added a commit
to grafana/mimir
that referenced
this pull request
Jul 31, 2023
Using weaveworks/common#299 which is a more flexible approach. Note the check disappeared from `logging.go`, because it was a mistake to check that error. It comes from `io.Writer`, it won't be an app- level error.
bboreham
added a commit
to grafana/mimir
that referenced
this pull request
Jul 31, 2023
* Don't log errors that cause OOMs, using interface Using weaveworks/common#299 which is a more flexible approach. Note the check disappeared from `logging.go`, because it was a mistake to check that error. It comes from `io.Writer`, it won't be an app- level error. * Improved TestIngester_inflightPushRequests Signed-off-by: Marco Pracucci <marco@pracucci.com> --------- Signed-off-by: Marco Pracucci <marco@pracucci.com> Co-authored-by: Marco Pracucci <marco@pracucci.com>
56quarters
added a commit
to grafana/mimir
that referenced
this pull request
Jul 31, 2023
This allows us to decorate them with extra information for gRPC responses and our logging middleware (to prevent them from being logged, increasing resource usage). Related #5581 Related weaveworks/common#299 Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
56quarters
added a commit
to grafana/mimir
that referenced
this pull request
Aug 3, 2023
This allows us to decorate them with extra information for gRPC responses and our logging middleware (to prevent them from being logged, increasing resource usage). Related #5581 Related weaveworks/common#299 Signed-off-by: Nick Pillitteri <nick.pillitteri@grafana.com>
56quarters
added a commit
to grafana/mimir
that referenced
this pull request
Aug 3, 2023
…gging for them (#5585) This allows us to decorate them with extra information for gRPC responses and our logging middleware (to prevent them from being logged which is expensive). Related #5581 Related weaveworks/common#299
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If an error returned to gRPC implements
Observe
, then that will get called andGRPCServerLog
will do nothing.This would replace #293.