Skip to content

Commit

Permalink
Update collector/pg_database.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
  • Loading branch information
Sticksman and SuperQ committed Jun 25, 2023
1 parent 43e0475 commit cec3fb5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions collector/pg_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ func (c PGDatabaseCollector) Update(ctx context.Context, instance *instance, ch
return err
}

var sizeMetric float64
sizeMetric := 0.0
if size.Valid {
sizeMetric = size.Float64
} else {
sizeMetric = 0
}
ch <- prometheus.MustNewConstMetric(
pgDatabaseSizeDesc,
Expand Down

0 comments on commit cec3fb5

Please sign in to comment.