Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform-connectors/pkg/connectors/kubernetes/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ var (
nodeConditionUpdateDuration = promauto.NewHistogram(prometheus.HistogramOpts{
Name: "k8s_platform_connector_node_condition_update_duration_milliseconds",
Help: "Duration of node condition updates in milliseconds",
Buckets: prometheus.LinearBuckets(0, 10, 500),
Buckets: prometheus.ExponentialBuckets(10, 2, 12),
})

nodeEventUpdateCreateDuration = promauto.NewHistogram(prometheus.HistogramOpts{
Name: "k8s_platform_connector_node_event_update_create_duration_milliseconds",
Help: "Duration of node event updates/creations in milliseconds",
Buckets: prometheus.LinearBuckets(0, 10, 500),
Buckets: prometheus.ExponentialBuckets(10, 2, 12),
})
)
4 changes: 2 additions & 2 deletions platform-connectors/pkg/ringbuffer/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func (prometheusMetricsProvider) NewLatencyMetric(name string) workqueue.Histogr
return promauto.NewHistogramVec(prometheus.HistogramOpts{
Name: "platform_connector_workqueue_latency_seconds_" + name,
Help: "How long an item stays in Platform connector workqueue before being requested",
Buckets: prometheus.LinearBuckets(0, 10, 500),
Buckets: prometheus.ExponentialBuckets(10, 2, 12),
}, []string{workqueueLabel}).WithLabelValues(name)
}

func (prometheusMetricsProvider) NewWorkDurationMetric(name string) workqueue.HistogramMetric {
return promauto.NewHistogramVec(prometheus.HistogramOpts{
Name: "platform_connector_workqueue_work_duration_seconds_" + name,
Help: "How long processing an item from Platform connector workqueue takes",
Buckets: prometheus.LinearBuckets(0, 10, 500),
Buckets: prometheus.ExponentialBuckets(10, 2, 12),
}, []string{workqueueLabel}).WithLabelValues(name)
}

Expand Down
1 change: 1 addition & 0 deletions platform-connectors/pkg/ringbuffer/ring_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func NewRingBuffer(ringBufferName string, ctx context.Context, opts ...Option) *
}

workqueue.SetProvider(prometheusMetricsProvider{})

rateLimiter := workqueue.NewTypedItemExponentialFailureRateLimiter[*protos.HealthEvents](
cfg.baseDelay,
cfg.maxDelay,
Expand Down
Loading