pr / done (pull_request) Canceled after 0s
runbook이 코드가 내지 않는 신호로 장애를 찾게 한다. actuator·cross-tenant runbook은 아무 코드도 내지 않는 ACTUATOR_FORBIDDEN·AUTHZ_TENANT_MISMATCH를 증상으로 적고, 없는 경보·지표·로그 칸을 적는다. auth runbook은 로그에서 token payload·Authorization 원문을 보라고 하고(남지도 않고 남겨서도 안 된다), 없는 JWKS 캐시 손잡이와 decoder가 읽지 않는 Spring issuer 키를 적는다. rate-limit·dependency runbook은 없는 gateway 지표·헤더· CACHE_UNAVAILABLE·dependency_name 칸을, web runbook은 연산마다의 TTL, 시험 도구 GracefulShutdownProbe, 없는 tag routeTemplate, 기동이 거부하는 CORS 설정을 「기동은 된다」고 적는다. job runbook은 내는 코드가 없는 JOB_DEAD_LETTER·JOB_TIMEOUT과 job.* 지표에 경보를 걸게 한다. 각 runbook을 지금 코드가 내는 신호로 다시 쓴다: 응답 코드·헤더, 보안 로그 줄 `security failure: code=… path=…`, 요청 로그 줄, ServerFailureLog 의 고정 문구(`dependency failure classified as … dependency=<이름>`, `persistence failure classified as …`), 실제 설정 키 APP_SECURITY_JWT_ISSUER, registry에 있는 지표. 이 템플릿에 경보 규칙이 없다는 것, 내는 코드가 없는 코드·지표는 서비스가 낼 때만 있다는 것을 적는다. 진단 순서도 고친다: actuator 노출은 관리 포트 9001로 가르고, INTERNAL_AUTH_MISCONFIGURATION은 issuer discovery(4xx·issuer 불일치· jwks_uri 없음은 500, 연결 실패·5xx·JSON 아님은 503)부터, 종료 예산은 웹 drain 30s + async 19s + preStop의 합으로 본다. 같은 원인의 다른 자리(경보 이름을 지어 적은 job·outbox·internal-error-spike, traceId로 적은 칸, 지적 밖 auth·dependency·db·outbox runbook, error-codes.yaml 주석, 같은 틀린 신호를 적은 shared-contract README·web README· DependencyFailureException Javadoc)도 고치고, 본문의 리뷰 ID는 지운다. 버린 안: 선언만 있는 두 코드를 내는 WARN·counter를 새로 만들기. actuator 노출 밖 경로는 메인 chain이 401 AUTH_TOKEN_MISSING(익명)·404(인증됨)로 답해 403 상황이 없고, cross-tenant는 정한 규칙(남의 것은 404)이라 판정 자리가 서비스 코드에 있다. 새 신호는 서비스가 더할 일로 runbook에 적는다. 위험: 문서만 바뀐다. runbook은 모두 status 초안으로 둔다. dependency-unavailable이 적은 hikaricp.connections.pending·timeout 행과 job.* 행의 emitted_when은 관측 registry 변경(같은 묶음의 다른 PR)이 더하고, auth-jwks-unavailable의 「캐시가 지난 뒤 503」은 인증 PR의 JWKS 재조회 분류 수정이 만든다. 세 PR을 함께 병합한다. 검증: python3 scripts/check-docs.py·check-work-docs.py OK, desktop :app-bootstrap:documentContractTest :app-bootstrap:repositoryContractTest, scripts/verify.sh pr rc=0. Refs: RR9-02-04, RR9-02-24, RR9-04-34, RR9-04-37
3.1 KiB
3.1 KiB
title, category, error_codes, severity, owner, last_updated, status
| title | category | error_codes | severity | owner | last_updated | status | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Runbook — 외부 의존성 unavailable | TRANSIENT_DEPENDENCY |
|
P1 | oncall | 2026-11-13 | 초안 |
Runbook: 외부 의존성 unavailable
증상
- DB: 503
DB_UNAVAILABLE과 ERROR 줄persistence failure classified as DB_UNAVAILABLE (category=TRANSIENT_DEPENDENCY, retryable=true)(ServerFailureLog, 원인 사슬은 붙지 않는다). - outbound HTTP: 지금 httpclient 예외는 코드를 싣지 않아 500
INTERNAL_ERROR와 ERROR 줄unhandled exception on …이 된다. registry의DEPENDENCY_*코드는DependencyFailureException을 던지는 서비스 코드에서만 나오고, ERROR 줄dependency failure classified as DEPENDENCY_… (category=TRANSIENT_DEPENDENCY, retryable=…, dependency=<이름>)을 남긴다. - Redis:
CACHE_UNAVAILABLE코드는 없다. cache 읽기가 실패하면 원천에서 읽고 HTTP 오류는 없다. WARN 줄Redis semantic operation degraded; capability=… operation=… failureType=…(RedisSemanticFailureLogger)이 남는다. cache만이 아니라 idempotency·rate-limit·lease도 같은 줄을 낸다. 같은 capability·operation·failureType은 1분에 한 번만 WARN이고 나머지는 DEBUG라, 경보는 건수가 아니라 그 줄이 나왔는지로 건다. - 이 템플릿은 경보 규칙·대시보드를 두지 않는다. 서비스가 위 줄의 고정 문구(
persistence failure classified as,dependency failure classified as,unhandled exception on,Redis semantic operation degraded)와http.server.requests(tagstatus,uri)로 만든다. 업스트림 이름은dependency=값뿐이다. 위 줄들에는dependency_name칸이 없다.
진단
- outbound HTTP 지표(httpclient capability를 켠 서비스):
http.client.requests(tagclientName,outcome=success|failure),http.client.retry.count,http.client.retry.exhausted,http.client.circuit.state(1=open),http.client.circuit.state.rejected(docs/registries/metrics.yaml). Resilience4j 자체 지표(resilience4j_*)는 묶지 않았다. - DB 풀:
hikaricp.connections.active·hikaricp.connections.pending·hikaricp.connections.timeout(persistence-jpa를 켠 서비스). - readiness는 DB와 required Redis만 본다. outbound HTTP 의존은 readiness에 들지 않는다.
조치
- DB·required Redis 장애면 readiness가 트래픽을 뺀다. 회복을 기다린다.
- outbound 의존 장애면 그 클라이언트의 timeout·retry·circuit 설정(
docs/httpclient/)을 본다. circuit을 손으로 되돌리는 actuator는 없다(circuitbreakerevents는 노출하지 않는다). - 풀이 고갈되면 풀 크기와 오래 쥔 트랜잭션을 본다.
에스컬레이션
- required 의존이 5분 안에 돌아오지 않으면 그 의존의 담당이나 vendor에 넘긴다.
Stub 상태 안내: 이 runbook은 skeleton 단계의 stub. 도메인 도입 시 실제 dependency 목록·required/optional 분류·vendor 연락 체계·circuit/timeout 임계로 보강 필요.