-
Notifications
You must be signed in to change notification settings - Fork 197
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
module/apmgrpc: add stream interceptors #918
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
62dd126
to
6be2edb
Compare
Codecov Report
@@ Coverage Diff @@
## master #918 +/- ##
==========================================
- Coverage 83.79% 83.61% -0.19%
==========================================
Files 140 141 +1
Lines 7895 8036 +141
==========================================
+ Hits 6616 6719 +103
- Misses 877 911 +34
- Partials 402 406 +4
Continue to review full report at Codecov.
|
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.
comment on a TODO but other than that looks good
defer tx.End() | ||
|
||
// TODO(axw) define context schema for RPC, | ||
// including at least the peer address. |
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.
is context span.Context
here?
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.
yes, I'll reword to clarify
* module/apmgrpc: add stream interceptors
Add server and client stream interceptors. Very similar to unary interceptors -- the transaction and span represents the entire gRPC stream.
Client spans are ended when the stream is closed, which is observed when stream methods return with an error, or for unary servers, RecvMsg returns (not necessarily with an error). This is very similar to the client wrapper in apmhttp, where the span is ended only after the response body is consumed.
Closes #901