- analysis/·source-index·state.json 을 final/document.md 제2부·제3부로 접었다. SSOT 는 하나다 - 파일럿 — commit-ambiguity-as-a-result 를 새 기준으로 재선별. 후보 14 → 글감 5 (PROMOTE 5 · MERGE_INTO 3 · KEEP_IN_SSOT 4 · 보류 2). 기록 5건을 다시 썼고 그림 1개를 techviz 로 만들었다 - 재선별이 잡은 것: 제1부 §6.2·§11.1 이 자기 §13.2 와 어긋나 있었다(레인을 안 돌렸다 vs 돌렸다) — 정정. 이미 답이 나와 있던 Question 을 HEAD 재실행 질문으로 다시 세웠다. Concept 이 인용한 코드가 SSOT 에 없어 뺐다 - candidateScope·sourceRepository 기록. 나머지 43개 주제는 재선별 대기(PENDING 905) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
67 lines
3.4 KiB
Markdown
67 lines
3.4 KiB
Markdown
---
|
|
kind: CONCEPT
|
|
slug: grpc-observability-c03
|
|
title: allowlist가 기본 거절이고 거절 목록은 메시지를 위한 것이다
|
|
topic: observability-models
|
|
project: clean-architecture-backend-template
|
|
status: 게시 전
|
|
sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916
|
|
rootTreeNode: concept:grpc-observability-c03
|
|
evidenceCapturedOn: 2026-09-01
|
|
assets:
|
|
- key: grpc-observability-c03
|
|
file: ../../../final/evidence/rendered/grpc-observability-c03.svg
|
|
evidence:
|
|
- ../../../final/evidence/raw/grpc-observability-c03.txt
|
|
source:
|
|
- 원본 분석 절은 final/document.md#a20-grpc-observability#L74 이다.
|
|
module: grpc-observability
|
|
---
|
|
|
|
# allowlist가 기본 거절이고 거절 목록은 메시지를 위한 것이다
|
|
|
|
`violations(Map)` 의 판정 순서가 셋이고, 그중 `FORBIDDEN_TAGS` 분기는 판정을 바꾸지 않고 진단만 바꾼다. 두 번째 분기의 allowlist가 이미 그것들을 거절한다.
|
|
|
|
## 본문
|
|
|
|
<!-- body:start -->
|
|
|
|
`violations(Map)` 의 판정 순서가 셋이다.
|
|
|
|
```java
|
|
if (FORBIDDEN_TAGS.contains(key)) → "its value space grows with traffic…"
|
|
if (!ALLOWED_TAGS.contains(key)) → "not on the bounded allowlist [...]"
|
|
if (UNBOUNDED_VALUE.matcher(value)) → "looks like an identifier or a credential"
|
|
```
|
|
|
|
클래스 javadoc 이 두 목록이 겹치는 이유를 적는다 — "Everything unlisted is refused anyway; naming the dangerous ones gives the refusal a message that says why rather than just that." 즉 `FORBIDDEN_TAGS` 는 판정을 바꾸지 않고 진단만 바꾼다. 두 번째 분기가 이미 그것들을 거절한다.
|
|
|
|
## 허용 태그 여덟과 명시적 거절 열하나
|
|
|
|
허용 태그: `grpc.service` · `grpc.method` · `grpc.rpc_type` · `grpc.status` · `grpc.channel_profile` · `grpc.completion_outcome` · `grpc.retry_bucket` · `grpc.stream_termination_reason`.
|
|
|
|
명시적 거절: `actor_id` · `tenant_id` · `object_id` · `stream_id` · `idempotency_key` · `request` · `response` · `metadata` · `authorization` · `error_detail` · `trace_id`.
|
|
|
|
## GrpcRpcObservation 참조 위치
|
|
|
|
:::evidence key="grpc-observability-c03" alt="코드베이스에서 GrpcRpcObservation 를 검색한 출력 5줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="GrpcRpcObservation 코드베이스 검색 — 5줄 · exit 0" zoom="true"
|
|
:::
|
|
|
|
## 값 검사가 잡지 못하는 것
|
|
|
|
UUID · `sha256:` 접두 · `bearer ` 접두. 숫자 id, 이메일, 호스트명은 잡히지 않는다. 그리고 `.` 은 기본적으로 개행에 맞지 않으므로 값에 개행이 섞이면 `matches()` 가 거짓이 된다.
|
|
|
|
## 시도 수를 값이 아니라 버킷으로 접는다
|
|
|
|
`retryBucket(int)` 이 1-based 시도 수를 받아 `0`/`1`/`2`/`3+` 로 접는다. 0 이하는 던진다. javadoc 이 이유를 적는다 — "an attempt count is unbounded in principle and the distinction anyone acts on is first attempt, one retry, several."
|
|
|
|
## 재시도 한 번이 호출 하나로 남는 이유
|
|
|
|
`GrpcRpcObservation` javadoc 이 적는다.
|
|
|
|
> "A retried call is one observation with a retry bucket, and three attempt events beneath it; recording three separate calls instead makes the success rate read as 33% when the caller in fact got its answer."
|
|
|
|
그 분리가 `GrpcObservationConvention.record(GrpcRpcObservation)` 에서 실제로 그렇게 구현되어 있다 — `RPC_DURATION` 타이머는 1회, `RPC_ATTEMPTS` 카운터는 `attempts` 만큼 증가. 같은 태그 집합을 쓴다.
|
|
|
|
<!-- body:end -->
|