Skip to content

Commit

Permalink
replaced promauto with prometheus, as earlier was causing unnecessary…
Browse files Browse the repository at this point in the history
… panic

Signed-off-by: Yash Sharma <[email protected]>
  • Loading branch information
yashrsharma44 committed Mar 1, 2021
1 parent a94ad2e commit bc09a82
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/route/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ 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 @@ -232,19 +231,19 @@ func newHandlerHashring(appendables []*receive.FakeAppendable, replicationFactor
Max: 30 * time.Second,
Jitter: true,
},
forwardRequests: promauto.NewCounterVec(
forwardRequests: prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "thanos_receive_forward_requests_total",
Help: "The number of forward requests.",
}, []string{"result"},
),
replications: promauto.NewCounterVec(
replications: prometheus.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: promauto.NewGauge(
replicationFactor: prometheus.NewGauge(
prometheus.GaugeOpts{
Name: "thanos_receive_replication_factor",
Help: "The number of times to replicate incoming write requests.",
Expand Down

0 comments on commit bc09a82

Please sign in to comment.