Skip to content

API 지연 패널 집계에서 SSE 구독 제거 - #1192

Open
m-a-king wants to merge 1 commit into
devfrom
infra/1187-exclude-sse-from-latency-panels
Open

m-a-king wants to merge 1 commit into
devfrom
infra/1187-exclude-sse-from-latency-panels

Conversation

@m-a-king

Copy link
Copy Markdown
Collaborator

Situation

SSE 연결 수명이 섞인 지연 집계

grafana terraform state 유실

  • 이관 전 state 위치는 구 계정 버킷 piki-tfstate-996918499382 의 grafana.tfstate
    • 구 계정 버킷 조회 결과 404
  • 신 계정 버킷 piki-tfstate-731770491043 에 grafana.tfstate 없음
    • 원인: 계정 이관 워크플로에 grafana state 이전 단계 없음
  • 위험: 빈 state 로 plan 하면 Grafana 자원 전체가 생성 대상으로 잡힘

Task

지연 패널 3개 쿼리 수정

Action

지연 쿼리 5개에 subscribe 제외 조건 추가

  • 패널 3개(API p95 지연·API 지연 p50/p95/p99·엔드포인트별 p95)의 쿼리 전부
선택지 장점 비용
span_name 정확 일치 (채택) 다른 subscribe 경로를 건드리지 않음 구독 경로가 바뀌면 조건도 함께 수정
span_name 정규식 매칭 구독 경로 변경에 덜 민감 다른 subscribe 경로까지 걸릴 수 있음

Result

수정 전후 패널 값

항목 수정 전 수정 후
prod p95 80초 58ms
prod p99 129초 171ms
dev p95 90초 30ms
dev p99 90초 136ms
prod 엔드포인트별 p95 최댓값 136초 631ms
dev 엔드포인트별 p95 최댓값 90초 18.9초
  • 조건: 변수 2개($environment·$__rate_interval=1d)만 치환한 파일 식의 실행값
  • 원인: dev 엔드포인트별 최댓값 18.9초는 dev 배포 직후 /v3/api-docs 1건

후속

  • grafana terraform state 복구 뒤 apply
    • 기존 Grafana 자원 import
  • terraform-grafana README 의 실행 안내를 신 계정 기준으로 갱신
    • 현재 안내는 구 계정 프로필 aws-vault exec piki

연관 이슈

- core 대시보드 지연 쿼리 5개에 subscribe span 제외 조건 추가
  - API p95 지연·API 지연(p50 / p95 / p99)·엔드포인트별 p95 패널 3개
  - 원인: SSE 연결 수명이 지연으로 집계됨
    - SSE 는 서버 타임아웃 없음
  - 결과: 1일 창 prod p95 80초에서 58ms 로 바뀜
- 제외 조건은 span_name 정확 일치
  - 대안: span_name 정규식 매칭
    - 기각: 다른 subscribe 경로까지 걸릴 수 있음
- 엔드포인트별 p95 패널도 같은 조건 적용
  - 원인: SSE 선 하나가 y축을 수십 초까지 늘림
  - 비용: SSE 연결 수명을 볼 패널 0개
@m-a-king m-a-king linked an issue Oct 12, 2026 that may be closed by this pull request
@m-a-king m-a-king added the infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow) label Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: TeamPiKi/core/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e2fd964-79b9-44f4-9760-45fa14d218b6

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@m-a-king m-a-king self-assigned this Oct 12, 2026
@github-actions

Copy link
Copy Markdown

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API 지연 패널 집계에서 SSE 구독 제거

1 participant