Skip to content

Commit b8a0e68

Browse files
author
buildpad-starter
committed
fix(grafana): exclude SSE events endpoint from API latency panels
The /events SSE stream holds connections open for minutes, far beyond the histogram's 10s top bucket, pinning overall p95/p99 to 10s even though real RPCs are sub-50ms. Filter rpc!="events" on the latency p50/p95/p99 and top-5-slowest panels so they reflect actual request latency.
1 parent bd3cf2f commit b8a0e68

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

deploy/helm/simaops-api/templates/grafana-dashboard-api.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ data:
206206
},
207207
"targets": [
208208
{
209-
"expr": "histogram_quantile(0.50, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket[5m])))",
209+
"expr": "histogram_quantile(0.50, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket{rpc!=\"events\"}[5m])))",
210210
"refId": "A",
211211
"legendFormat": "p50",
212212
"datasource": {
@@ -215,7 +215,7 @@ data:
215215
}
216216
},
217217
{
218-
"expr": "histogram_quantile(0.95, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket[5m])))",
218+
"expr": "histogram_quantile(0.95, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket{rpc!=\"events\"}[5m])))",
219219
"refId": "B",
220220
"legendFormat": "p95",
221221
"datasource": {
@@ -224,7 +224,7 @@ data:
224224
}
225225
},
226226
{
227-
"expr": "histogram_quantile(0.99, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket[5m])))",
227+
"expr": "histogram_quantile(0.99, sum by (le) (rate(simaops_api_http_request_duration_seconds_bucket{rpc!=\"events\"}[5m])))",
228228
"refId": "C",
229229
"legendFormat": "p99",
230230
"datasource": {
@@ -281,7 +281,7 @@ data:
281281
},
282282
"targets": [
283283
{
284-
"expr": "topk(5, histogram_quantile(0.95, sum by (le, rpc) (rate(simaops_api_http_request_duration_seconds_bucket[5m]))))",
284+
"expr": "topk(5, histogram_quantile(0.95, sum by (le, rpc) (rate(simaops_api_http_request_duration_seconds_bucket{rpc!=\"events\"}[5m]))))",
285285
"refId": "A",
286286
"legendFormat": "{{`{{rpc}}`}}",
287287
"datasource": {

0 commit comments

Comments
 (0)