From c62e7eac5309b00af8f756ca47a22d0bfc578f27 Mon Sep 17 00:00:00 2001 From: mamad Date: Fri, 28 Aug 2026 21:10:52 +0330 Subject: [PATCH] metrics: configure explicit histogram buckets for AI response latency --- core/metrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/metrics.py b/core/metrics.py index 3a34ef7..8de6825 100644 --- a/core/metrics.py +++ b/core/metrics.py @@ -59,7 +59,8 @@ ERRORS_RESOLVED_TOTAL = Counter( AI_LATENCY_SECONDS = Histogram( "copykar_ai_latency_seconds", "Time taken for AI API operations", - ["action"] + ["action"], + buckets=(0.5, 1.0, 2.0, 3.0, 5.0, 8.0, 12.0, 20.0, 30.0, 45.0, 60.0, 90.0, 120.0, 180.0) ) # Gauges