-
Notifications
You must be signed in to change notification settings - Fork 86
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
Miscellaneous traces and counters #2874
Conversation
25ab7c7
to
6a9c17c
Compare
545bb2a
to
4aa347b
Compare
@newhoggy I think this is for IntersectMBO/cardano-node#2261, is that right? The existing "metric" pattern seems to do the accumulation of counters in |
As you noticed, there is no "I just now served a block" event currently emitted. However, we do trace every mini protocol message sent/received, via the following tracers. And they can be set here. (I think you can ignore the So in a sense the metrics could use those. But maybe more precise events |
Are you counting roll forwards and rollbacks for the sake of https://jira.iohk.io/browse/CAD-2371? If so, I think you can instead use the existing |
4aa347b
to
f3a8362
Compare
This PR is actually for https://jira.iohk.io/browse/CAD-2487. I understood roll forward to mean a header was served in chain sync. Is that an accurate interpretation or am I way off base? |
I rebased the PR to an earlier point in history so I don't have to refactor anything when working on |
I think that's accurate, yes. (My suggestion of The only caveat to that interpretation is that we might send the same header to the same peer multiple times. I think this is ultimately a caveat on the wording of the Issue IntersectMBO/cardano-node#2261: it's just slightly ambiguous. My guess is that these metrics should indeed count each send of a repeated header, in which case I agree with your interpretation: every |
4364473
to
9373997
Compare
9373997
to
6b77b86
Compare
ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/BlockFetch/Server.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/ChainSync/Server.hs
Outdated
Show resolved
Hide resolved
4ccf930
to
f6f74d6
Compare
@nfrisby that's a good point. What I am worried about is that when setting logging output off by passing |
7f93791
to
b45d148
Compare
6356302
to
463fa09
Compare
Ah, I see. That seems like a good reason to have two different inputs in the Consensus Layer's interface (say, "loggingTracers" vs "metricTracers" or maybe "countingTracers") , which at some point in the Consensus Layer implementation get combined via That distinction/duplication could be reflected in the |
I've separated the counters from the tracers. How does it look now? |
94a3ebd
to
053da54
Compare
88ad9eb
to
9a4ce52
Compare
@newhoggy, @nfrisby, I'm afraid that the
cc @dcoutts |
There is concern about getting the abstraction right and the refactoring adds downstream refactoring risk. Choosing the right abstraction for handling counters and tracers separately seems to be the sole remaining concern. To make progress on IntersectMBO/cardano-node#2261, I will back out the refactoring changes and merge. Then I'll create a new PR for the refactoring where more time can be set aside for careful consideration. |
9a4ce52
to
6f6f509
Compare
I've moved the refactoring here: #2902 |
bors merge |
Build succeeded: |
I like the decision to spit the PR into two separate Unfortunately, just to clarify for future reference, it looks like But if the work on the follow-up PR #2902 doesn't proceed very quickly, let's go ahead and remove that essentially unused |
This PR tracks the work done for IntersectMBO/cardano-node#2261.
There is also work being done on the
cardano-node
repository for the same ticket: IntersectMBO/cardano-node#2289