transport: Increment metrics only when the stream is active#8573
transport: Increment metrics only when the stream is active#8573easwars merged 14 commits intogrpc:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8573 +/- ##
==========================================
+ Coverage 80.91% 82.13% +1.21%
==========================================
Files 413 415 +2
Lines 40751 40712 -39
==========================================
+ Hits 32972 33437 +465
+ Misses 6155 5899 -256
+ Partials 1624 1376 -248
🚀 New features to boost your workflow:
|
arjan-bal
left a comment
There was a problem hiding this comment.
Thanks for sending the PR, nice job writing a unit test for this!
|
@arjan-bal thx for the review, i updated additional comments |
arjan-bal
left a comment
There was a problem hiding this comment.
LGTM, with a minor comment. Assigning a second reviewer.
| } | ||
|
|
||
| // Always create a real stream through the client | ||
| ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) |
There was a problem hiding this comment.
nit: We should create a context at the beginning of t.Run with a timeout of defaultTestTimeout. This should help ensure that the entire test case finishes within 10 seconds.
|
@hugehoo : Please take care of the couple of minor nitty comments. Thanks for your contribution again. |
|
Also, the PR title seems to be broken. Could you please fix that too. |
Fixes: #8529
This PR fixes to increment metrics only when the stream is active which is found in the activeStreams map.
as-is
to-be
RELEASE NOTES: