From db69153831c2994e059fe6015a49ecaef3bfc08b Mon Sep 17 00:00:00 2001 From: KiSeungMin Date: Mon, 21 Sep 2026 17:37:29 +0900 Subject: [PATCH] =?UTF-8?q?[Chore]=20=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C?= =?UTF-8?q?=20=ED=8F=89=EA=B7=A0=20=EC=9D=91=EB=8B=B5=EC=8B=9C=EA=B0=84,?= =?UTF-8?q?=20=EC=99=B8=EB=B6=80=20API=20=EC=84=B1=EA=B3=B5=EB=A5=A0,=20Re?= =?UTF-8?q?dis=20=ED=9E=88=ED=8A=B8=EC=9C=A8=20=ED=8C=A8=EB=84=90=EC=9D=98?= =?UTF-8?q?=20=EA=B0=92=EA=B3=BC=20=EC=83=89=EC=9D=84=20=EA=B3=A0=EC=B9=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 평균 응답시간은 분모를 clamp_min(…, 1e-9) 에서 > 0 으로 바꾼다. 앱이 재시작되면 같은 라벨의 요청 수는 그대로인데 시간 합만 늘어나는 경우가 있어서, 요청 수 증가량 0 을 1e-9 로 바꿔 나누면 1,250만 ms 같은 값이 나왔다. 이제 그 URI 는 값을 비운다 - 외부 API 성공률은 호출이 없을 때 "최근 1시간 호출 없음" 이 임계값 기준색(빨강) 위에 떴다. null 매핑으로 회색을 준다 - Redis 히트율은 인증 요청마다 로그아웃 토큰과 탈퇴 사용자 블랙리스트를 조회하고 두 키 모두 대부분 없는 것이 정상이라 5% 안팎이 평소 값이다. 경고색을 없애고 패널 설명에 이유를 적는다 Closes #338 --- monitoring/grafana/dashboards/ono-backend-overview.json | 4 ++-- .../grafana/dashboards/ono-dependency-overview.json | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/monitoring/grafana/dashboards/ono-backend-overview.json b/monitoring/grafana/dashboards/ono-backend-overview.json index 90a48b86..faccbb37 100644 --- a/monitoring/grafana/dashboards/ono-backend-overview.json +++ b/monitoring/grafana/dashboards/ono-backend-overview.json @@ -564,14 +564,14 @@ }, "targets": [ { - "expr": "topk(20, 1000 * (sum by (uri, method) (rate(http_server_requests_seconds_sum{job=~\"$job\",uri=~\"/api.*\"}[1h])) / clamp_min(sum by (uri, method) (rate(http_server_requests_seconds_count{job=~\"$job\",uri=~\"/api.*\"}[1h])), 1e-9)))", + "expr": "topk(20, 1000 * (sum by (uri, method) (rate(http_server_requests_seconds_sum{job=~\"$job\",uri=~\"/api.*\"}[1h])) / (sum by (uri, method) (rate(http_server_requests_seconds_count{job=~\"$job\",uri=~\"/api.*\"}[1h])) > 0)))", "legendFormat": "{{method}} {{uri}}", "refId": "A" } ], "title": "API 평균 응답시간 (URI Top20, 1h)", "type": "timeseries", - "description": "URI 별 평균. 느린 API 를 찾는 용도다." + "description": "URI 별 평균. 느린 API 를 찾는 용도다. 최근 1시간 요청 수가 늘지 않은 URI 는 값을 비운다. 앱이 재시작되면 요청 수는 그대로인데 시간 합만 늘어나는 경우가 있어서, 0 대신 1e-9 로 나누면 수백만 ms 가 나온다." }, { "datasource": { diff --git a/monitoring/grafana/dashboards/ono-dependency-overview.json b/monitoring/grafana/dashboards/ono-dependency-overview.json index 2e1bd0ae..ee284255 100644 --- a/monitoring/grafana/dashboards/ono-dependency-overview.json +++ b/monitoring/grafana/dashboards/ono-dependency-overview.json @@ -211,9 +211,7 @@ "thresholds": { "mode": "absolute", "steps": [ - {"color": "red", "value": null}, - {"color": "orange", "value": 0.6}, - {"color": "green", "value": 0.9} + {"color": "blue", "value": null} ] }, "unit": "percentunit" @@ -243,6 +241,7 @@ "refId": "A" } ], + "description": "Redis 조회 중 키가 있었던 비율. 인증이 필요한 요청마다 로그아웃 토큰 블랙리스트와 탈퇴 사용자 블랙리스트를 조회하는데(RedisTokenService.isBlacklisted, isUserBlacklisted), 두 키 모두 대부분 없는 것이 정상이라 이 값은 낮게 나온다. 낮다고 장애가 아니라서 경고색을 두지 않는다.", "title": "Redis Hit Ratio", "type": "stat" }, @@ -366,6 +365,9 @@ {"color": "green", "value": 0.99} ] }, + "mappings": [ + {"type": "special", "options": {"match": "null", "result": {"text": "최근 1시간 호출 없음", "color": "#808080", "index": 0}}} + ], "noValue": "최근 1시간 호출 없음", "unit": "percentunit" },