Skip to content

Commit

Permalink
style: Update handling time histogram buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jun 28, 2024
1 parent 595e8fe commit 5582734
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/go-co-op/gocron"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel/sdk/trace"
Expand Down Expand Up @@ -270,7 +269,13 @@ func (x *Xatu) startGrpcServer(ctx context.Context) error {

mb100 := 1024 * 1024 * 100

grpc_prometheus.EnableHandlingTimeHistogram(grpc_prometheus.WithHistogramBuckets(prometheus.ExponentialBucketsRange(0.1, 30, 10)))
grpc_prometheus.EnableHandlingTimeHistogram(
grpc_prometheus.WithHistogramBuckets(
[]float64{
0.01, 0.03, 0.1, 0.3, 1, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33,
},
),
)

opts := []grpc.ServerOption{
grpc.MaxRecvMsgSize(mb100),
Expand Down

0 comments on commit 5582734

Please sign in to comment.