fix(nodecompat): procs 수집기 제거 — stat 을 끄면서 메트릭 4종을 잃고 있었다 - #38
Merged
Conversation
0.9.2 카나리(e106, 실노드)에서 잡혔다. node_* family 가 301 → 297 로 줄었고, 사라진 넷은 전부 upstream "stat" collector 소관이다: node_boot_time_seconds node_context_switches_total node_forks_total node_intr_total nodecompat 의 procs 수집기는 node_procs_running / node_procs_blocked 둘만 내면서 Supersedes() 로 "stat" 전체를 끈다. 대체는 collector 단위라 전부-아니면-전무인데 일부만 낸 것이다. 결과는 직전에 고친 중복과 똑같은 실패 모드다 — 파드는 Ready, /metrics 는 200, 시리즈만 조용히 사라진다. ## 가드가 이걸 못 잡았던 이유 기존 회귀 가드는 "중복이 없는가"만 봤다. 손실은 반대 방향이라 그대로 통과했다. 게다가 이름만 보고는 어느 collector 소관인지 알 수 없다 — node_boot_time_seconds 가 "stat" 것이라는 사실은 upstream 코드를 열어야 나온다. parity 테스트로 교체한다. NodeCollector.Collectors 로 대체 대상 collector 를 **개별 수집**해 그것이 실제로 내는 이름을 얻고, 자체 수집기가 내는 집합과 정확히 일치하는지 본다: upstream 에만 있는 이름 → 손실 (그 메트릭은 아무데서도 나오지 않는다) native 에만 있는 이름 → 중복 (끄지 못한 collector 와 충돌한다) 한 테스트가 양방향을 모두 막으므로 기존 collision 테스트는 여기에 흡수됐다. "대체 대상 collector 가 아무것도 안 냈으면 실패" 단언도 함께 둔다 — 그 경우 비교가 공허하게 통과한다. ## 조치 procs 수집기를 제거하고 upstream "stat" 에 맡긴다. 같은 /proc/stat 을 읽으면서 일곱을 온전히 내므로 자체 구현의 실익이 없다. 없는 이유를 소스에 남겼다 — 빠진 것은 이유가 보이지 않으면 "빠뜨린 것" 으로 읽힌다. 남는 자체 수집기는 loadavg·uname·entropy·filefd·vmstat·osrelease 이고, 전부 대체 대상과 메트릭 집합이 일치한다(Linux 실측).
|
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.
0.9.2 카나리(e106, 실노드)에서 잡혔습니다.
node_*family 가 301 → 297 로 줄었고, 사라진 넷은 전부 upstreamstatcollector 소관입니다:node_boot_time_seconds·node_context_switches_total·node_forks_total·node_intr_totalnodecompat의procs수집기는node_procs_running/blocked둘만 내면서Supersedes()로stat전체를 끕니다. 대체는 collector 단위라 전부-아니면-전무인데 일부만 낸 것입니다. 결과는 #35 에서 고친 중복과 똑같은 실패 모드 — 파드는 Ready,/metrics는 200, 시리즈만 조용히 사라집니다.가드가 못 잡았던 이유
#35 의 회귀 가드는 "중복이 없는가"만 봤습니다. 손실은 반대 방향이라 그대로 통과했습니다. 게다가 이름만 보고는 어느 collector 소관인지 알 수 없습니다 —
node_boot_time_seconds가stat것이라는 사실은 upstream 코드를 열어야 나옵니다.parity 테스트로 교체합니다.
NodeCollector.Collectors로 대체 대상 collector 를 개별 수집해 실제로 내는 이름을 얻고, 자체 수집기가 내는 집합과 정확히 일치하는지 봅니다:한 테스트가 양방향을 모두 막으므로 기존 collision 테스트는 여기에 흡수했습니다. "대체 대상이 아무것도 안 냈으면 실패" 단언도 함께 둡니다(공허한 통과 방지).
검증: 수정 전 Linux 에서 정확히 그 4개를 잡는 것을 확인했고,
procs제거 후 통과합니다.조치
procs를 제거하고 upstreamstat에 맡깁니다 — 같은/proc/stat을 읽으면서 일곱을 온전히 냅니다. 없는 이유를 소스에 남겼습니다(빠진 것은 이유가 보이지 않으면 "빠뜨린 것"으로 읽힙니다).남는 자체 수집기는
loadavg·uname·entropy·filefd·vmstat·osrelease이고 전부 대체 대상과 집합이 일치합니다(Linux 실측).Chart/appVersion
0.9.2→0.9.3.