avalanchego icon indicating copy to clipboard operation
avalanchego copied to clipboard

ETA metrics are kept to 0

Open tubededentifrice opened this issue 2 years ago • 2 comments

Describe the bug Prometheus ETA metrics are always 0. They seem to be correctly set at https://github.com/ava-labs/avalanchego/blob/master/snow/engine/common/queue/jobs.go#L188 but are then immediatly set back to 0 at https://github.com/ava-labs/avalanchego/blob/master/snow/engine/common/queue/jobs.go#L204

To Reproduce Run a curl -X POST 127.0.0.1:9650/ext/metrics | less on a bootstrapping node and check the following metrics:

avalanche_C_block_eta_execution_complete
avalanche_C_bs_eta_fetching_complete
avalanche_X_tx_eta_execution_complete
avalanche_X_vtx_eta_execution_complete
avalanche_P_block_eta_execution_complete
avalanche_P_bs_eta_fetching_complete

Expected behavior Correctly display the "ETA in nanoseconds until execution phase of bootstrapping finishes"

Operating System Debian Bullseye

tubededentifrice avatar Sep 11 '22 11:09 tubededentifrice

I'm unfamiliar with the code base, but it looks like https://github.com/ava-labs/avalanchego/blob/master/snow/engine/common/queue/jobs.go#L204 should just be moved to https://github.com/ava-labs/avalanchego/blob/master/snow/engine/common/queue/jobs.go#L115 for it to work as intended

tubededentifrice avatar Sep 11 '22 12:09 tubededentifrice

Ah - eagle eye. It was intended for this metric to be zeroed out outside of the for's scope. Will be fixed in the next release.

StephenButtolph avatar Sep 12 '22 16:09 StephenButtolph

Closing this down since it is fixed

abi87 avatar Feb 21 '23 22:02 abi87