We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5908e5b commit 0bdcc12Copy full SHA for 0bdcc12
1 file changed
pkg/metrics/gauge.go
@@ -14,7 +14,7 @@ type Gauge struct {
14
labels map[string]string
15
16
value float64
17
- timestamp int64
+ timestamp int64 // timestamp expressed as milliseconds
18
mutex sync.RWMutex
19
}
20
@@ -24,7 +24,7 @@ func (g *Gauge) Set(value float64) {
24
defer g.mutex.Unlock()
25
26
g.value = value
27
- g.timestamp = time.Now().UnixNano() / int64(time.Millisecond)
+ g.timestamp = time.Now().UnixNano() / 1e6
28
29
30
// Exposes the gauge in the text-based exposition format.
0 commit comments