Skip to content

Commit

Permalink
used promauto
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Sharma <[email protected]>
  • Loading branch information
yashrsharma44 committed Mar 3, 2021
1 parent c35d09c commit b35dace
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/route/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/jpillora/backoff"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/common/route"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/storage"
Expand Down Expand Up @@ -231,19 +232,19 @@ func newHandlerHashring(appendables []*receive.FakeAppendable, replicationFactor
Max: 30 * time.Second,
Jitter: true,
},
forwardRequests: prometheus.NewCounterVec(
forwardRequests: promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "thanos_receive_forward_requests_total",
Help: "The number of forward requests.",
}, []string{"result"},
),
replications: prometheus.NewCounterVec(
replications: promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "thanos_receive_replications_total",
Help: "The number of replication operations done by the receiver. The success of replication is fulfilled when a quorum is met.",
}, []string{"result"},
),
replicationFactor: prometheus.NewGauge(
replicationFactor: promauto.NewGauge(
prometheus.GaugeOpts{
Name: "thanos_receive_replication_factor",
Help: "The number of times to replicate incoming write requests.",
Expand Down

0 comments on commit b35dace

Please sign in to comment.