fix: include storenodes without missing messages in metrics

This commit is contained in:
Richard Ramos 2024-10-25 12:01:33 -04:00
parent c69dea6da6
commit cd36306b12
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760

View File

@ -449,8 +449,8 @@ func (app *Application) countMissingMessages(storenodes []peer.ID) error {
if err != nil { if err != nil {
return err return err
} }
for storenode, cnt := range results { for _, storenodeID := range storenodes {
app.metrics.RecordMissingMessagesLastHour(storenode, cnt) app.metrics.RecordMissingMessagesLastHour(storenodeID, results[storenodeID])
} }
// not including last two hours in now to let sync work // not including last two hours in now to let sync work
@ -461,8 +461,8 @@ func (app *Application) countMissingMessages(storenodes []peer.ID) error {
if err != nil { if err != nil {
return err return err
} }
for storenode, cnt := range results { for _, storenodeID := range storenodes {
app.metrics.RecordMissingMessagesLastDay(storenode, cnt) app.metrics.RecordMissingMessagesLastDay(storenodeID, results[storenodeID])
} }
// Count messages in last week (not including last two hours) // Count messages in last week (not including last two hours)