-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add a gRPC interceptor for embedding payloads into trace spans #900
Add a gRPC interceptor for embedding payloads into trace spans #900
Conversation
[CHATOPS:HELP] ChatOps commands.
|
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
==========================================
+ Coverage 15.94% 15.98% +0.04%
==========================================
Files 474 474
Lines 23693 23707 +14
==========================================
+ Hits 3778 3790 +12
- Misses 19678 19679 +1
- Partials 237 238 +1
Continue to review full report at Codecov.
|
05ed181
to
6e87b03
Compare
80384c2
to
5adf052
Compare
6e87b03
to
aaa7b7a
Compare
5adf052
to
af018a2
Compare
aaa7b7a
to
8f7b0ff
Compare
af018a2
to
f5e2132
Compare
8f7b0ff
to
c80b8d0
Compare
f5e2132
to
f699079
Compare
ad99d8b
to
df36f12
Compare
c80b8d0
to
6f75ff2
Compare
df36f12
to
3e558e5
Compare
6f75ff2
to
2297533
Compare
7e8cb6b
to
dbbaa13
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.
Others LGTM
In this PR, the package structure of the interceptor seems to have changed. |
Thanks. that's good idea. I'll try to do it. |
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com> fixup! ✨ Add TracePayloadInterceptor Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com> 📄 update license headers Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com> ✏️ Fix typo Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
c164b20
to
4e681d8
Compare
@kpango this PR is revised as you mentioned. could you please review again? |
traceAttrGRPCResponsePayload = "grpc.response.payload" | ||
) | ||
|
||
var ( |
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.
🚫 [golangci] reported by reviewdog 🐶
File is not gofumpt
-ed (gofumpt)
) | ||
|
||
var ( | ||
bufferPool = sync.Pool{ |
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.
🚫 [golangci] reported by reviewdog 🐶
bufferPool is a global variable (gochecknoglobals)
@@ -84,23 +85,24 @@ func TestRecoverInterceptor(t *testing.T) { | |||
if err := test.checkFunc(test.want, got); err != nil { | |||
tt.Errorf("error = %v", 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.
🚫 [golangci] reported by reviewdog 🐶
File is not gofumpt
-ed (gofumpt)
@@ -147,6 +149,7 @@ func TestRecoverStreamInterceptor(t *testing.T) { | |||
if err := test.checkFunc(test.want, got); err != nil { | |||
tt.Errorf("error = %v", 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.
🚫 [golangci] reported by reviewdog 🐶
File is not gofumpt
-ed (gofumpt)
// | ||
|
||
// Package recover provides gRPC interceptors for recovery | ||
package recover |
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.
🚫 [golangci] reported by reviewdog 🐶
package name recover has same name as predeclared identifier (predeclared)
// Package grpc provides generic functionality for grpc | ||
package grpc | ||
// Package recover provides gRPC interceptors for recovery | ||
package recover |
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.
🚫 [golangci] reported by reviewdog 🐶
package name recover has same name as predeclared identifier (predeclared)
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
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.
Looks Really Good for Me, thanks for revise.
Thanks! |
Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com
Description:
In this PR, I added a gRPC interceptor for embedding gRPC request & response payloads into trace spans.
Related Issue:
nothing
How Has This Been Tested?:
nothing
Environment:
Types of changes:
Changes to Core Features:
Checklist: