Skip to content

Commit

Permalink
refactor: shorten the naming of DefaultHistogramBuckets
Browse files Browse the repository at this point in the history
  • Loading branch information
rueian committed Dec 14, 2023
1 parent 5ff7f42 commit 5cacd16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rueidisotel/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

var (
DefaultHistogramDefaultBuckets = []float64{
DefaultHistogramBuckets = []float64{
.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10,
}
DefaultDialFn = func(dst string, dialer *net.Dialer, cfg *tls.Config) (conn net.Conn, err error) {
Expand All @@ -30,7 +30,7 @@ type HistogramOption struct {
}

// WithHistogramOption sets the HistogramOption.
// If not set, DefaultHistogramDefaultBuckets will be used.
// If not set, DefaultHistogramBuckets will be used.
func WithHistogramOption(histogramOption HistogramOption) Option {
return func(cli *otelclient) {
cli.histogramOption = histogramOption
Expand Down Expand Up @@ -96,7 +96,7 @@ func newClient(opts ...Option) *otelclient {
opt(cli)
}
if cli.histogramOption.Buckets == nil {
cli.histogramOption.Buckets = DefaultHistogramDefaultBuckets
cli.histogramOption.Buckets = DefaultHistogramBuckets
}
if cli.meterProvider == nil {
cli.meterProvider = otel.GetMeterProvider() // Default to global MeterProvider
Expand Down

0 comments on commit 5cacd16

Please sign in to comment.