Reset BlockbookAppInfo metrics to avoid duplicate values
This commit is contained in:
parent
77d4e59f1b
commit
67e47adf04
@ -358,8 +358,9 @@ func blockbookAppInfoMetric(db *db.RocksDB, chain bchain.BlockChain, txCache *db
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
metrics.BlockbookAppInfo.Reset()
|
||||||
metrics.BlockbookAppInfo.With(common.Labels{
|
metrics.BlockbookAppInfo.With(common.Labels{
|
||||||
"blockbook_version": si.Blockbook.Version,
|
"blockbook_version": si.Blockbook.Version + time.Now().String(),
|
||||||
"blockbook_commit": si.Blockbook.GitCommit,
|
"blockbook_commit": si.Blockbook.GitCommit,
|
||||||
"backend_version": si.Backend.Version,
|
"backend_version": si.Backend.Version,
|
||||||
"backend_subversion": si.Backend.Subversion,
|
"backend_subversion": si.Backend.Subversion,
|
||||||
|
|||||||
@ -67,6 +67,7 @@ func (w *SyncWorker) ResyncIndex(onNewBlock bchain.OnNewBlockFunc) error {
|
|||||||
case errSynced:
|
case errSynced:
|
||||||
// this is not actually error but flag that resync wasn't necessary
|
// this is not actually error but flag that resync wasn't necessary
|
||||||
w.is.FinishedSyncNoChange()
|
w.is.FinishedSyncNoChange()
|
||||||
|
w.metrics.IndexDBSize.Set(float64(w.db.DatabaseSizeOnDisk()))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user