feat: [metrics] Create metrics framework and add connection metrics#407
feat: [metrics] Create metrics framework and add connection metrics#407charlesdong1991 wants to merge 8 commits intoapache:mainfrom
Conversation
fresh-borzoni
left a comment
There was a problem hiding this comment.
@charlesdong1991 Ty for the PR, left some comments
PTAL
|
Thanks for reviews, i made some changes and leave a question. PTAL @fresh-borzoni |
There was a problem hiding this comment.
@charlesdong1991 LGTM overall, small comment about misleading doc, and we can do simple math to match Java here, at least semantically. PTAL
btw, just to clarify before making changes, do you mean to update code to fix header overhead? or to update the doc to reflect this? @fresh-borzoni |
Sorry, I should have been more specific - I meant code @charlesdong1991 |
|
Gotcha, thanks @fresh-borzoni will do a quick change, should be straightforward 👍 |
|
i updated code to calculate total size "manually", PTAL @fresh-borzoni thanks again! |
|
@charlesdong1991 TY, LGTM |
Purpose
Linked issue: close #390
Brief change log
This PR adds a metrics framework and connection level metrics.
NOTE:
There is an parity from Java, which is the scopeguard for in-flight on cancellation, because Java callback model doesn't have equivalent to tokio future cancellation. And if a tokio future is dropped mid-execution, it would skip decrement and cause gauge drift. So i think it's important to add "scopeguard" to avoid that.
And I can have writer and scanner metrics as follow-up PRs.
Tests
All tests are passed locally.