diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index e4a289473..33f8c4e9a 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -126,7 +126,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "queue_highest_sent_timestamp", - Help: "Timestamp from a WAL sample, the highest timestamp successfully sent by this queue.", + Help: "Timestamp from a WAL sample, the highest timestamp successfully sent by this queue, in seconds since epoch.", }, []string{queue}, ) @@ -524,7 +524,7 @@ func (t *QueueManager) setHighestSentTimestamp(highest int64) { defer t.timestampLock.Unlock() if highest > t.highestSentTimestamp { t.highestSentTimestamp = highest - t.highestSentTimestampMetric.Set(float64(t.highestSentTimestamp)) + t.highestSentTimestampMetric.Set(float64(t.highestSentTimestamp) / 1000.) } } diff --git a/storage/remote/storage.go b/storage/remote/storage.go index 428773c05..062a5c949 100644 --- a/storage/remote/storage.go +++ b/storage/remote/storage.go @@ -71,7 +71,7 @@ func NewStorage(l log.Logger, reg prometheus.Registerer, stCallback startTimeCal }), highestTimestampMetric: prometheus.NewGauge(prometheus.GaugeOpts{ Name: "prometheus_remote_storage_highest_timestamp_in", - Help: "Highest timestamp that has come into the remote storage via the Appender interface.", + Help: "Highest timestamp that has come into the remote storage via the Appender interface, in seconds since epoch.", }), } reg.MustRegister(s.samplesInMetric) diff --git a/storage/remote/write.go b/storage/remote/write.go index f44662af1..5038425a6 100644 --- a/storage/remote/write.go +++ b/storage/remote/write.go @@ -55,7 +55,7 @@ func (t *timestampTracker) Commit() error { defer t.storage.highestTimestampMtx.Unlock() if t.highestTimestamp > t.storage.highestTimestamp { t.storage.highestTimestamp = t.highestTimestamp - t.storage.highestTimestampMetric.Set(float64(t.highestTimestamp)) + t.storage.highestTimestampMetric.Set(float64(t.highestTimestamp) / 1000.) } return nil }