From fa3d49bc1b5b52dd797bb3c340b89a6dc38e93b6 Mon Sep 17 00:00:00 2001 From: Jun Ouyang Date: Thu, 19 Sep 2024 12:37:19 +0800 Subject: [PATCH] feat(prometheus): bump prometheus KONG_LATENCY_BUCKETS bucket to 6000 (#13588) FTI-5990 --------- Co-authored-by: Zachary Hu <6426329+outsinre@users.noreply.github.com> (cherry picked from commit d81973d5bbbe6f5222184ff328809609f06c6590) --- changelog/unreleased/kong/bump-prometheus-latency-bucket.yml | 3 +++ kong/plugins/prometheus/exporter.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/kong/bump-prometheus-latency-bucket.yml diff --git a/changelog/unreleased/kong/bump-prometheus-latency-bucket.yml b/changelog/unreleased/kong/bump-prometheus-latency-bucket.yml new file mode 100644 index 000000000000..ec2247a786e6 --- /dev/null +++ b/changelog/unreleased/kong/bump-prometheus-latency-bucket.yml @@ -0,0 +1,3 @@ +message: "**Prometheus**: Bumped KONG_LATENCY_BUCKETS bucket's maximal capacity to 6000" +type: feature +scope: Plugin diff --git a/kong/plugins/prometheus/exporter.lua b/kong/plugins/prometheus/exporter.lua index bdc5eeafcbce..b02b8655cd77 100644 --- a/kong/plugins/prometheus/exporter.lua +++ b/kong/plugins/prometheus/exporter.lua @@ -17,7 +17,7 @@ local stream_available, stream_api = pcall(require, "kong.tools.stream_api") local role = kong.configuration.role -local KONG_LATENCY_BUCKETS = { 1, 2, 5, 7, 10, 15, 20, 30, 50, 75, 100, 200, 500, 750, 1000 } +local KONG_LATENCY_BUCKETS = { 1, 2, 5, 7, 10, 15, 20, 30, 50, 75, 100, 200, 500, 750, 1000, 3000, 6000 } local UPSTREAM_LATENCY_BUCKETS = { 25, 50, 80, 100, 250, 400, 700, 1000, 2000, 5000, 10000, 30000, 60000 } local AI_LLM_PROVIDER_LATENCY_BUCKETS = { 250, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 10000, 30000, 60000 } local IS_PROMETHEUS_ENABLED