From e996f6d44b270a66be2d4cbc6fb8b8bb2a03c6ba Mon Sep 17 00:00:00 2001 From: "blinkagent[bot]" <237617714+blinkagent[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:43:54 +0100 Subject: [PATCH] chore: increase coderd_chatd_message_count histogram max bucket to 1024 (#24409) The `coderd_chatd_message_count` histogram's current max bucket of 128 is being hit in production. This increases the exponential bucket count from 8 to 11, extending coverage from `1..128` to `1..1024`. Before: `1, 2, 4, 8, 16, 32, 64, 128` After: `1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024` Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> --- coderd/x/chatd/chatloop/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/x/chatd/chatloop/metrics.go b/coderd/x/chatd/chatloop/metrics.go index c815c53544..95ed43ab76 100644 --- a/coderd/x/chatd/chatloop/metrics.go +++ b/coderd/x/chatd/chatloop/metrics.go @@ -50,7 +50,7 @@ func NewMetrics(reg prometheus.Registerer) *Metrics { Subsystem: metricsSubsystem, Name: "message_count", Help: "Number of messages in the prompt per LLM request.", - Buckets: prometheus.ExponentialBuckets(1, 2, 8), // 1, 2, 4, 8, 16, 32, 64, 128 + Buckets: prometheus.ExponentialBuckets(1, 2, 11), // 1, 2, 4, ..., 1024 }, []string{"provider"}), PromptSizeBytes: factory.NewHistogramVec(prometheus.HistogramOpts{ Namespace: metricsNamespace,