Skip to content

Commit

Permalink
fix grpc metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Neznaykin committed Apr 15, 2024
1 parent 6b2340b commit 8d7be09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
7 changes: 4 additions & 3 deletions client/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx"
grpcprom "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/timeout"
"github.com/prometheus/client_golang/prometheus"
"github.com/rs/zerolog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down Expand Up @@ -50,9 +51,9 @@ func (c *Client) Start(ctx context.Context) error {

if c.cfg.MetricsEnabled {
cm := grpcprom.NewClientMetrics(
grpcprom.WithClientHandlingTimeHistogram(
grpcprom.WithHistogramBuckets([]float64{0.001, 0.01, 0.1, 0.3, 0.6, 1, 3, 6, 9, 20, 30, 60, 90, 120}), //nolint:lll
))
grpcprom.WithClientHandlingTimeHistogram())

prometheus.MustRegister(cm)

options = append(
options,
Expand Down
18 changes: 0 additions & 18 deletions client/grpc/utils.go

This file was deleted.

0 comments on commit 8d7be09

Please sign in to comment.