-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
…ck has been selected.
@@ -44,6 +47,8 @@ | |||
private final EthContext ethContext; | |||
private final SyncState syncState; | |||
private final MetricsSystem metricsSystem; | |||
private final Counter pivotBlockSelectionCounter; | |||
private final AtomicLong pivotBlockGauge = new AtomicLong(0); |
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 actually want a gauge which I can set the value for instead of having to pass in a supplier. Prometheus metrics support this (in fact it's all it supports natively) but not sure if we should complicate the metrics API to expose that or not.
Normally the pivot block number is only stored in FastSyncState
which is immutable and just passed as a method argument so we can't create a gauge that reads the value directly from there.
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.
What would be nicer is if we could de-register the gauge or make it optional sensitive so the value doesn't report when we are not fast-syncing. If I ever get back to my labeled gauge work I'll try to remember that as well.
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.
Very true.
@@ -44,6 +47,8 @@ | |||
private final EthContext ethContext; | |||
private final SyncState syncState; | |||
private final MetricsSystem metricsSystem; | |||
private final Counter pivotBlockSelectionCounter; | |||
private final AtomicLong pivotBlockGauge = new AtomicLong(0); |
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.
What would be nicer is if we could de-register the gauge or make it optional sensitive so the value doesn't report when we are not fast-syncing. If I ever get back to my labeled gauge work I'll try to remember that as well.
…ck has been selected. (PegaSysEng#1537)
PR description
Add two metrics: