Skip to content

Commit

Permalink
fix buckets (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 authored Jan 10, 2025
1 parent f2b0514 commit 19de1f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/observability/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ func initMetricsRouter(metricsPort int) {

// registerMetrics initializes and register the Prometheus metrics.
func registerMetrics() {
defaultHistogramBucketsSeconds := []float64{0.1, 0.5, 1, 2.5, 5, 10, 30}
pollerDurationHistogram = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "poll_duration_seconds",
Help: "Histogram of poll durations in seconds.",
Buckets: defaultHistogramBucketsSeconds,
Buckets: []float64{1, 5, 10, 30, 60, 120, 300, 600, 1200, 3600},
},
[]string{"poller_name", "status"},
)
Expand All @@ -87,7 +86,7 @@ func registerMetrics() {
prometheus.HistogramOpts{
Name: "btcclient_duration_seconds",
Help: "Histogram of btcclient durations in seconds.",
Buckets: defaultHistogramBucketsSeconds,
Buckets: []float64{0.1, 0.5, 1, 2.5, 5, 10, 30},
},
[]string{"function", "status"},
)
Expand Down

0 comments on commit 19de1f9

Please sign in to comment.