Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/runtime-reachability-and-composition/case/case-grpc-observability-f01.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

91 lines
3.9 KiB
Markdown

---
kind: CASE
slug: grpc-observability-f01
title: queueHighWatermark 는 요구되고 검증되지만 아무도 읽지 않는다
topic: runtime-reachability-and-composition
project: clean-architecture-backend-template
status: 게시 전
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
rootTreeNode: case:grpc-observability-f01
evidenceCapturedOn: 2026-09-01
assets:
- key: grpc-observability-f01
file: ../../../final/evidence/rendered/grpc-observability-f01.svg
evidence:
- ../../../final/evidence/raw/grpc-observability-f01.txt
source:
- 원본 분석 절은 analysis/grpc/grpc-observability.md#L197 이다.
module: grpc-observability
priority: P3
---
# queueHighWatermark 는 요구되고 검증되지만 아무도 읽지 않는다
GrpcStreamObservation 의 7성분 중 queueHighWatermark 만 소비자가 없다. tags() 에 없고, GrpcObservationConvention.record(GrpcStreamObservation) 이 등록하는 세 meter(STREAM_LIFETIME·STREAM_MESSAGES·STREAM_FLOW_CONTROL_STALLS) 어디에도 들어가지 않는다.
## 문제
GrpcStreamObservation 의 7성분 중 queueHighWatermark 만 소비자가 없다.
tags() 에 없고, GrpcObservationConvention.record(GrpcStreamObservation) 이 등록하는 세 meter(STREAM_LIFETIME·STREAM_MESSAGES·STREAM_FLOW_CONTROL_STALLS) 어디에도 들어가지 않는다.
## 결론
테스트도 250L 을 넘기고 그 값에 대해 아무것도 단언하지 않는다.
클래스 javadoc 이 "what is recorded instead is …" 로 세 가지를 열거하는데 그 목록에도 없다.
즉 서술과 구현은 일치하고, 어긋난 것은 필수 생성자 인자라는 점이다.
호출자는 측정해서 넘겨야 하고 그 값은 버려진다.
수정은 둘 중 하나다 — STREAM_QUEUE_HIGH_WATERMARK gauge/counter 를 추가하거나, 성분에서 뺀다.
큐 최고 수위는 소비자 지연의 직접 지표이므로 전자가 이 클래스의 목적에 맞는다.
## 검증 환경
OpenJDK : 21.0.12 java -version 으로 확인
Gradle : 9.0.0 src/gradle/wrapper/gradle-wrapper.properties 의 distributionUrl 로 확인
확인 방식 : GrpcStreamObservation 참조 5건 검색과 record 오버로드가 등록하는 meter 목록 대조
소스 수정 : x
## 재현 조건
원문은 analysis/grpc/grpc-observability.md#L197 에 있다.
## 본문
<!-- body:start -->
`GrpcStreamObservation` 의 7성분 중 `queueHighWatermark` 만 소비자가 없다.
```
GrpcStreamObservation.java:23 long queueHighWatermark, ← 선언
GrpcStreamObservation.java:31 … || queueHighWatermark < 0 ← 검증
그 외 저장소 전체 매치 0
```
## GrpcStreamObservation 참조 위치
:::evidence key="grpc-observability-f01" alt="코드베이스에서 GrpcStreamObservation 를 검색한 출력 5줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="GrpcStreamObservation 코드베이스 검색 — 5줄 · exit 0" zoom="true"
:::
## 세 meter 어디에도 들어가지 않는다
`tags()` 에 없고, `GrpcObservationConvention.record(GrpcStreamObservation)` 이 등록하는 `STREAM_LIFETIME`·`STREAM_MESSAGES`·`STREAM_FLOW_CONTROL_STALLS` 어디에도 없다. 테스트도 `250L` 을 넘기고 그 값에 대해 아무것도 단언하지 않는다.
## 서술과 구현은 일치한다
클래스 javadoc 이 "what is recorded instead is …" 로 세 가지를 열거하는데 그 목록에도 없다. 어긋난 것은 **필수 생성자 인자**라는 점이다 — 호출자는 측정해서 넘겨야 하고 그 값은 버려진다.
## 수정
`STREAM_QUEUE_HIGH_WATERMARK` gauge/counter 를 추가하거나, 성분에서 뺀다. 큐 최고 수위는 소비자 지연의 직접 지표이므로 전자가 이 클래스의 목적에 맞는다.
## 확인하지 못한 것
이 리프를 실제 MeterRegistry 에 배선해 돌린 적이 없다. 배선 자체가 없으므로 런타임 관측이 불가능하다.
<!-- body:end -->