Skip to content

Commit 7957fb4

Browse files
committed
Change to Gauge
Signed-off-by: Felix Yuan <[email protected]>
1 parent e4be608 commit 7957fb4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

collector/pg_xlog_location.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (PGXlogLocationCollector) Update(ctx context.Context, instance *instance, c
6969

7070
ch <- prometheus.MustNewConstMetric(
7171
xlogLocationBytes,
72-
prometheus.CounterValue,
72+
prometheus.GaugeValue,
7373
bytes,
7474
)
7575
}

collector/pg_xlog_location_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestPGXlogLocationCollector(t *testing.T) {
4747
}
4848
}()
4949
expected := []MetricResult{
50-
{labels: labelMap{}, value: 53401, metricType: dto.MetricType_COUNTER},
50+
{labels: labelMap{}, value: 53401, metricType: dto.MetricType_GAUGE},
5151
}
5252
convey.Convey("Metrics comparison", t, func() {
5353
for _, expect := range expected {

0 commit comments

Comments
 (0)