-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
feat: tracing for gRPC middleware #1086
Conversation
middleware/grpc_middleware.go
Outdated
log.WithError(err).Warn("could not build HTTP request") | ||
span.SetAttributes(attribute.String("oathkeeper.verdict", "denied")) | ||
span.SetStatus(codes.Error, err.Error()) | ||
span.End() |
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.
Isn't it ended on defer anyway?
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.
yeah, removed
middleware/grpc_middleware.go
Outdated
span.SetAttributes(attribute.String("oathkeeper.verdict", "denied")) | ||
span.SetStatus(codes.Error, err.Error()) | ||
span.End() | ||
return nil, err |
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.
Previously we returned ErrDenied
in all these cases. I think that should stay that way.
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.
good catch, this was from a previous iteration
34f51ce
to
b32e7b7
Compare
Codecov Report
@@ Coverage Diff @@
## master #1086 +/- ##
==========================================
+ Coverage 77.94% 78.40% +0.46%
==========================================
Files 80 80
Lines 3935 3834 -101
==========================================
- Hits 3067 3006 -61
+ Misses 589 556 -33
+ Partials 279 272 -7
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…1084) * feat: tracing for gRPC middleware (#1086) * chore(deps): bump github.com/opencontainers/runc from 1.1.4 to 1.1.5 Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.4 to 1.1.5. - [Release notes](https://github.com/opencontainers/runc/releases) - [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md) - [Commits](opencontainers/runc@v1.1.4...v1.1.5) --- updated-dependencies: - dependency-name: github.com/opencontainers/runc dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Arne Luenser <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The diff is much smaller when ignoring whitespace.