Skip to content

Commit

Permalink
Fix staleness metric units
Browse files Browse the repository at this point in the history
  • Loading branch information
torywheelwright committed Apr 22, 2024
1 parent 9b4148d commit 357e7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oplog/tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (tailer *Tailer) unmarshalEntry(rawData bson.Raw) (timestamp *primitive.Tim

metricOplogEntriesBySize.WithLabelValues(database, status).Observe(messageLen)
metricMaxOplogEntryByMinute.Report(messageLen, database, status)
metricLastOplogEntryStaleness.Set(float64(time.Since(time.Unix(int64(timestamp.T), 0))))
metricLastOplogEntryStaleness.Set(float64(time.Since(time.Unix(int64(timestamp.T), 0)).Seconds()))
}()

if len(entries) > 0 {
Expand Down

0 comments on commit 357e7a3

Please sign in to comment.