feat(notify): webhook 발송 — 재시도·억제·드롭 계수 - #10
Merged
Merged
Conversation
채널은 webhook 하나다. 메일·채팅 분배는 수신 측이 이미 잘 하는 일이고, 그것까지 품으면 SMTP·OAuth·템플릿이 따라와 '차트 하나 = 파드 하나' 가 무거워진다. - **드롭을 센다.** 재시도를 소진하면 droppedN 이 오른다. 조용히 사라지면 알림이 오지 않은 것을 아무도 모른다 — 프로토타입 시절 readiness 보고서가 지적했던 바로 그 실패 모드다. - **해소는 억제하지 않는다.** repeat 안이라도 resolved 는 반드시 나간다. 울린 알림이 풀렸다는 사실이 막히면 사람이 계속 대응한다. - **repeat 억제.** 30초마다 같은 내용이 오면 사람이 알림 자체를 꺼 버리고, 그게 가장 나쁜 결과다. 기본 4시간. - 백오프에 지터를 섞는다 — 없으면 여러 알림이 같은 순간에 재시도를 몰아 수신 측을 다시 넘어뜨린다.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
알림 스펙(1a)의 발송기입니다. 룰 엔진이 낸 알림을 밖으로 내보냅니다.
채널을 하나로 둔 이유
webhook 하나뿐입니다. 메일·채팅 분배는 수신 측이 이미 잘 하는 일이고, 그것까지 품으면 SMTP·OAuth·템플릿이 따라와 "차트 하나 = 파드 하나"가 무거워집니다.
조용한 실패를 막는 세 가지
드롭을 셉니다. 재시도를 소진하면
Dropped()가 오르고 이 값은/metrics로 나갑니다. 프로토타입 시절 readiness 보고서가 지적한 "5회 재시도 후 조용히 드롭"을 반복하지 않습니다 — 알림이 오지 않은 것을 아무도 모르는 상태가 최악입니다.해소는 억제하지 않습니다.
repeat_interval안이라도resolved는 반드시 나갑니다. 울린 알림이 풀렸다는 사실이 막히면 사람이 계속 대응합니다.repeat 억제. 반대로 firing 은 기본 4시간 안에 다시 보내지 않습니다. 30초마다 같은 내용이 오면 사람이 알림 자체를 꺼 버리고, 그게 가장 나쁜 결과입니다.
그 외
백오프에 지터를 섞습니다 — 없으면 여러 알림이 같은 순간에 재시도를 몰아 이미 힘든 수신 측을 다시 넘어뜨립니다.
검증
6개 테스트: 발송·페이로드 형식 / repeat 억제 / 해소는 억제 안 함 / 재시도 소진 후 드롭 계수 / 소진 전 복구 / 빈 목록.
httptest로 5xx·복구를 실제로 재현합니다.