Skip to content

Commit 0a221a3

Browse files
committed
Expect a floating point value for the total seconds
Signed-off-by: Tom Hughes <[email protected]>
1 parent 988f865 commit 0a221a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

collector/pg_process_idle.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (PGProcessIdleCollector) Update(ctx context.Context, instance *instance, ch
8383
GROUP BY 1, 2, 3;`)
8484

8585
var applicationName sql.NullString
86-
var secondsSum sql.NullInt64
86+
var secondsSum sql.NullFloat64
8787
var secondsCount sql.NullInt64
8888
var rawSeconds []byte
8989
var rawSecondsBucket []byte
@@ -124,7 +124,7 @@ func (PGProcessIdleCollector) Update(ctx context.Context, instance *instance, ch
124124
}
125125
secondsSumMetric := 0.0
126126
if secondsSum.Valid {
127-
secondsSumMetric = float64(secondsSum.Int64)
127+
secondsSumMetric = float64(secondsSum.Float64)
128128
}
129129
ch <- prometheus.MustNewConstHistogram(
130130
pgProcessIdleSeconds,

0 commit comments

Comments
 (0)