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: expose pool aggregate statistics #1255
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1255 +/- ##
==========================================
+ Coverage 94.08% 94.10% +0.02%
==========================================
Files 43 44 +1
Lines 4071 4086 +15
==========================================
+ Hits 3830 3845 +15
Misses 241 241
Continue to review full report at Codecov.
|
Could we provide more info through diagnostic channels so that these stats can be built in user space? |
That's an interesting idea, I guess in metrics terms these are more like gauges, while diagnostics channels are counters. I think it's possible that one could use diagnostic channels counters to emulate some of these by doing some bookkeeping, though I think it might require quite a few more diagnostic channels since some of these are overlapping? |
I'm happy to add more channels! |
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.
lgtm
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.
I still think for best performance and reactive API adding more diagnostic channels and implementing this on top of that is a better idea.
@mnutt Do you think you could add something similar to |
This relates to...
In achieving parity with the node.js agent, I'd like to be able to get aggregate statistics about requests and connections in undici. This is possible today, but requires using private symbols.
Addresses #1254, relates to #693 -- I just now noticed that one, so will review it to see if there's any feedback that can be applied here.
Rationale
I currently use the node.js agent and send its stats to prometheus; I'd like to send the same ones for undici to be able to instrument the switchover and ensure everything is working properly.
Changes
stats
getter on pools.Features
stats
object.Bug Fixes
N/A
Breaking Changes and Deprecations
N/A
Status
KEY: S = Skipped, x = complete