-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Condense Blockstore RPC API datapoints #34045
Condense Blockstore RPC API datapoints #34045
Conversation
Note that the datapoint will not be sent if all of the fields are 0
Codecov Report
@@ Coverage Diff @@
## master #34045 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 811 811
Lines 219552 219597 +45
=========================================
+ Hits 179902 179923 +21
- Misses 39650 39674 +24 |
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.
Just the one question about counting get_complete_block
calls.
@@ -2033,10 +2045,9 @@ impl Blockstore { | |||
slot: Slot, |
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.
(sorry, this is the closest place I could add a comment) Should we add a datapoint for get_complete_block()
? It would be used when getBlock
is called with commitment: confirmed
, so potentially quite a lot, although it would also double count on commitment: finalized
.
Could be a follow-up, if yes is the answer.
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.
Good point. get_confirmed_signatures_for_address2()
could also call get_complete_block()
via get_sorted_block_signatures()
.
I'm tempted to leave things as-is for now as what I introduced is at parity with what we had previously. I think there are several cases of double counts (get_block_time()
is called as a subroutine as well), and probably makes sense to review all the methods and come up with a consistent scheme across the board
Problem
Currently, the RPC API that touch the Blockstore emit a datapoint for
each call. For an RPC node serving many requests, these datapoints
could get quite noisy, both in logs as well as traffic to the metrics
agent.
Summary of Changes
So, instead of submitting a datapoint for every call, accumulate the
number of calls in a struct and report that entire struct periodically.