From 4d98d3c56ecadf8c038f8fc1b928391322c20b0d Mon Sep 17 00:00:00 2001 From: Guillermo Gonzalez Date: Wed, 4 Jan 2023 19:31:27 +0000 Subject: [PATCH] tune histogram buckets for wsgi and requests latency (milliseconds) --- talisker/requests.py | 2 +- talisker/wsgi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/talisker/requests.py b/talisker/requests.py index 3d6d9337..06bc78a3 100644 --- a/talisker/requests.py +++ b/talisker/requests.py @@ -86,7 +86,7 @@ class RequestsMetric: labelnames=['host', 'view', 'status'], statsd='{name}.{host}.{view}.{status}', # predefining these sucks - buckets=[4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192], + buckets=[50, 100, 500, 1000, 2000, 5000, 7500, float("inf")], ) count = talisker.metrics.Counter( diff --git a/talisker/wsgi.py b/talisker/wsgi.py index 49545132..675c0b0d 100644 --- a/talisker/wsgi.py +++ b/talisker/wsgi.py @@ -128,7 +128,7 @@ class WSGIMetric: documentation='Duration of requests served by WSGI', labelnames=['view', 'status', 'method'], statsd='{name}.{view}.{method}.{status}', - buckets=[4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192], + buckets=[50, 100, 500, 1000, 2000, 5000, 7500, 10000, float("inf")], ) requests = talisker.metrics.Counter(