-
Notifications
You must be signed in to change notification settings - Fork 118
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
Added a counter metric for errors #477
Added a counter metric for errors #477
Conversation
8aca655
to
79ece7f
Compare
internal/internal.go
Outdated
@@ -392,7 +411,7 @@ func (p *envoyExtAuthzGrpcServer) check(ctx context.Context, req interface{}) (* | |||
} | |||
|
|||
if ctx.Err() != nil { | |||
err = errors.Wrap(ctx.Err(), "check request timed out before query execution") | |||
err = errors.Wrap(ctx.Err(), CheckRequestTimeoutErrorMessage) |
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.
[nit] We should introduce our own error type here, and match on that type instead of the error message, please.
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.
@srenatus Thanks for the comment! I have tried to address this with minimal changes, please do review.
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.
Thanks! I'll review it tomorrow unless @ashutosh-narkar beats me to it.
da9e765
to
c4ae67a
Compare
c4ae67a
to
0e5ef44
Compare
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.
@rudrakhp the changes look good. There seems to be some repetition in the test cases. If we reduce that by moving out common logic, that could be helpful.
8797fd3
to
f07838f
Compare
Thanks for your comments @ashutosh-narkar ! Addressed them. |
f07838f
to
c917678
Compare
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
c917678
to
a0b06fe
Compare
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. Thanks @rudrakhp!
Resolves open-policy-agent/opa#6351