콘텐츠로 이동

Runtime metric과 집계 규칙

Observability 주제 목차 · 스펙 목차 · 이전: 01. Runtime 상태와 운영 진단 · 다음: 03. Message flow tracing

시간에 따라 누적·수집하는 metric의 이름, 종류, 단위와 label을 정의한다. 이 주제 안 다른 문서와의 소유 경계는 Observability 책임 지도를 따른다.

1. Metric 계약 개요

Framework의 처리량, 대기, 실패와 현재 개수를 집계하는 metric의 이름, 종류, 단위와 label을 정의한다. 모든 언어는 같은 계약으로 값을 기록하므로 하나의 dashboard와 alert rule을 공통으로 사용할 수 있다.

현재 runtime과 topology의 완전한 상태는 Runtime 상태 조회와 운영 진단, message 한 건의 진행 기록은 Message flow tracing, host operation의 개별 결과는 Host relocation과 shutdown이 소유한다. 전체 소유 지도는 주제 README를 참고한다.

주체 책임
Application 표준 metric provider를 구성하고 수집한 값으로 dashboard와 alert를 만든다.
Framework 이 문서의 이름·종류·단위·label로 값을 기록하며 message 처리 순서를 바꾸지 않는다.
Provider 수집 주기, histogram bucket, aggregation, exporter와 backend를 정한다.

Label 값의 종류는 application object나 message 수에 비례해 증가하지 않아야 한다. Exporter, registry, 저장소, histogram bucket과 backend는 Framework public contract가 아니다.

2. 이름과 집계 규칙

Metric 표에서 counter는 발생 횟수나 누적량을 단조 증가시키고, updown은 현재 개수가 늘거나 줄 때 그 차이를 기록한다. observable은 provider가 수집하는 시점의 현재 값을 읽고, histogram은 operation마다 측정한 값을 분포로 기록한다.

  • 계기 이름은 lowercase dotted ASCII인 zlink.<surface>.<name> 형식을 사용한다. 이름, label key와 허용 label value는 모든 언어에서 byte 단위로 같다 — 하나의 dashboard·alert rule을 언어와 무관하게 재사용하기 위해서다.
  • 시간 histogram의 단위는 초(s), byte 크기의 단위는 By, 나머지는 중괄호로 감싼 count unit을 사용한다.
  • Provider failure는 application callback, reply, 새 작업 수락과 host lifecycle 결과를 바꾸지 않는다.

2.1 Metric을 언제 기록하는가

Application이 표준 metric provider나 listener로 어떤 계기의 수집을 켜면, Framework는 이 문서가 정한 사건이 일어날 때마다 그 계기에 기록한다. 현재 값을 나타내는 계기는 provider가 읽어 갈 때 그 값을 준다.

  • Log 수준을 올리지 않아도 기록한다. logger의 수준, message-flow diagnostics의 level과 sampling 설정은 metric 기록을 끄지 못한다. metric과 log는 서로 다른 관측 축이고, log를 켜면 측정 대상의 동작과 성능이 함께 바뀌기 때문이다. Message-flow diagnostics와의 관계는 Message flow tracing §4가 소유한다.
  • status를 따로 조회하거나 변화를 관찰하기 시작할 필요가 없다. 계기 하나를 보려고 다른 관측 경로를 함께 켜야 하면 그 계기만 골라 수집할 수 없다.

여기서 "수집을 켠다"는 것은 그 계기를 수집하도록 provider를 설정했다는 뜻이다. Status stream을 구독한 사람 수, 지금 backend를 조회하는 사용자 수, log sink가 붙어 있는지와는 무관하다.

수집이 켜졌는지 확인하는 방법은 언어의 표준 meter·registry·provider에 맡긴다. 확인할 API가 없으면 표준 계기에 그냥 기록하고 provider가 수집하거나 버리게 해도 된다. Framework 공통 API는 구독자 수를 세거나 metric 전용 on/off 스위치를 두지 않는다. 얼마나 자주 읽어 가는지, 값을 어떻게 합치고 내보내는지는 §1과 §11이 정한 provider의 몫이다.

2.2 어떤 계기를 제공해야 하는가

각 언어는 이 문서의 조건에 해당하는 계기를 모두 제공한다. 수집이 켜진 동안 정의된 사건이 일어나면 기록하고, 현재 값을 나타내는 계기는 읽어 갈 때 그 값을 준다.

  • 계기를 등록만 하는 것으로는 부족하다. 이름이 등록돼 있어도 사건이 일어났을 때 기록하지 않으면 운영에서는 그 사건이 없었던 것과 같다.
  • 어떤 언어에서 그 사건이 구조적으로 일어날 수 없으면 그 차이와 이유를 해당 언어의 interface 문서에 적는다. 아직 구현하지 않았다는 것은 이 예외가 아니다. 구현 상태를 계약의 차이로 적으면 다음에 읽는 사람이 그것을 허용된 차이로 읽는다.

어떤 사건을 세고 무엇을 빼는지는 각 metric 절이 정한다.

2.3 수집이 꺼져 있을 때 무엇을 생략할 수 있는가

꺼진 계기에만 필요한 계산과 기록은 건너뛸 수 있다.

  • 꺼져 있던 동안의 counter 증가분과 histogram 표본을 나중에 되살릴 의무는 없다. histogram을 재는 데 필요한 시작 시각을 기록하지 않았다면 그 구간은 측정하지 않아도 된다.
  • 이미 수집하던 값을 얼마나 보관하고 새로 읽는 쪽에 어디까지 주는지는 provider가 값을 합치고 유지하는 방식을 따른다.

이 생략은 runtime이 다른 계약 때문에 유지하는 값을 건드리지 않는다. §3이 정한 현재 epoch의 counter와 누적값, 그리고 각 계기가 나타내는 현재 값은 수집을 켰는지와 무관하게 그대로다. 수집을 켜거나 끄는 것 자체는 measurement epoch의 Reset이 아니다.

  • 같은 증가분을 두 번 세지 않는다. counter를 증가분으로 보내든 유지하던 누적값을 읽어 가게 하든 표준 provider의 표현에 맞추면 되지만, 두 방식을 섞어 같은 사건을 중복해 세면 안 된다.
  • 현재 값과 epoch 누적값을 "꺼져 있던 구간의 일반 사건"으로 취급해 버리지 않는다.

꺼진 경로의 비용, 제한된 합계값을 읽는 방법, 기록 순서와 provider 실패는 §11이 정한다. metric을 켜도 message 처리·routing·완료 조건은 달라지지 않는다.

3. Host Core HWM과 Application job queue

다음 instance aggregate 계기는 Core runtime snapshot과 Application job queue accounting을 읽는다. Application job queue는 Framework host instance가 application callback 시작 전까지 보유하는 공유 permit 자원이다. Metric 수집을 위해 queue나 handler를 순회하지 않는다.

계기 종류 단위 Label 의미
zlink.host.core_hwm.effective_budget observable By 없음 Core가 startup에서 확정한 effective budget이다.
zlink.host.core_hwm.applied observable By 없음 Completion을 제외한 방향별 queue HWM의 합이다.
zlink.host.core_hwm.accounted observable By state Core의 current 또는 epoch peak accounted bytes다. DEALER-ROUTER reply byte를 포함한다.
zlink.host.core_hwm.completion_accounted observable By state ROUTER-ROUTER Completion connection의 current 또는 epoch peak accounted bytes다. DEALER-ROUTER reply byte는 포함하지 않는다.
zlink.host.core_hwm.blocked_ratio observable {ppm} 없음 Core snapshot의 blocked ratio다.
zlink.host.application_job_queue.limit observable {job} 없음 Startup에서 고정한 effective maximum이다.
zlink.host.application_job_queue.jobs observable {job} state reserved|queued|in_use|peak별 aggregate다.
zlink.host.application_job_queue.capacity_waiters observable {waiter} 없음 현재 capacity waiter 수다.
zlink.host.application_job_queue.capacity_waits counter {wait} 없음 현재 epoch의 capacity wait 횟수다.
zlink.host.application_job_queue.capacity_wait_duration counter s 없음 현재 epoch의 capacity wait 누적 시간이다.
zlink.host.application_job_queue.pressure_state observable {state} state 현재 상태에 해당하는 running·paused series 하나만 1로 관측한다.
zlink.host.application_job_queue.pressure_transitions counter {transition} state 현재 epoch에서 해당 running·paused 상태로 전이한 횟수다.
zlink.host.application_job_queue.pause_duration observable s state current·cumulative pause 시간이다.
zlink.host.application_job_queue.flow_state_config_failures counter {failure} 없음 현재 epoch에서 Core flow 절대 상태 적용에 실패한 횟수다.

Reset은 pressure state와 current pause duration을 포함한 current gauge를 유지하고 peak를 current로 재기준화하며, transition·cumulative duration·config failure를 포함한 epoch counter와 누계를 0으로 만든다. Reset 시점에 이미 paused이면 cumulative pause duration은 그 시점을 새 epoch 시작점으로 삼아 다시 누적한다. 이 measurement epoch 개념을 Runtime monitoring §4의 Host status capacity 항목이 조회 시점에 그대로 관찰하며, epoch·Reset 의미는 이 문서가 소유한다.

Always-on metric은 job마다 timestamp나 queue-wait histogram을 만들지 않는다. 물리 연결 그룹 등록 이름인 MeshName, Channel 등록 이름인 ChannelName, Actor ID, Spot의 전역 논리 주소인 Spot ID, session ID, RID, endpoint, packet name과 owner는 label로 사용하지 않는다.

4. Peer와 channel

한 process에서 peer 연결과 Channel 메시징을 제공하는 runtime 단위를 MeshNode라고 한다. 여러 MeshNode가 같은 메시징 규칙을 공유하는 논리 runtime을 RouteMesh라고 한다. RouteMesh는 MeshName으로, Channel은 ChannelName으로 startup에 등록한다. Framework가 조건을 만족한 member 가운데 하나를 선택하는 동작을 select-one이라고 한다.

기능별 serving 조건을 모두 만족한 Ready 상태의 peer와 member만 ready 계기에 포함한다. Remote MeshNode가 identity, endpoint, Channel 참여 정보와 상태를 알리려고 게시하는 MeshNode descriptor가 configured peer 집계의 기준이다.

계기 종류 단위 Label 의미
zlink.mesh_node.peers.configured observable {peer} mesh_name, source 현재 descriptor에 존재하는 peer 수를 제공한다.
zlink.mesh_node.peers.connected observable {peer} mesh_name, source 현재 transport가 연결된 peer 수를 제공한다.
zlink.mesh_node.peers.ready observable {peer} mesh_name, source 새 작업 수락 조건과 handler readiness를 통과한 peer 수를 제공한다.
zlink.mesh_node.channels.ready_members observable {member} mesh_name, channel_name Select-one에 사용할 수 있는 member 수를 제공한다.
zlink.mesh_node.channel.selection_failures counter {failure} mesh_name, channel_name, reason Select-one에 사용할 member가 없어 operation을 시작하지 못한 횟수를 누적한다.
zlink.mesh_node.requests.inflight updown {request} mesh_name, surface 현재 reply를 기다리는 request 수를 제공한다.
zlink.mesh_node.request.duration histogram s mesh_name, surface, outcome Submit부터 terminal completion까지 걸린 request 시간을 기록한다.
zlink.mesh_node.request.timeouts counter {request} mesh_name, surface Request timeout 발생 횟수를 누적한다.
Label
source manual, redis, manual_and_redis
Selection failure reason no_member, not_ready, draining
surface node, channel, spot, instance_spot, actor

5. One-way message drop

Reply를 만들지 않고 송신 완료와 remote handler 완료를 분리하는 호출을 one-way라고 한다. 이 절은 Framework가 remote handler에 전달하지 못한 원인을 확정할 수 있을 때만 횟수를 기록한다. message_kind는 handler namespace에서 send·request·publish 같은 호출 종류를 구분하는 message kind의 허용 값이다.

계기 종류 단위 Label 의미
zlink.mesh_node.messages.dropped counter {message} mesh_name, surface, message_kind, reason Framework가 원인을 확인한 one-way drop 횟수를 누적한다.

Message drop reasonno_handler|decode_error|backpressure|stale_target|shutdown이다. 이때 backpressure는 송신 경로나 queue의 capacity가 일시적으로 부족한 상태를 뜻한다.

Spot member 목록을 고정한 뒤 모든 대상에 보내는 Logical Multicast와 별도 PUB/SUB 연결로 event를 보내는 classic fanout publish는 제외한다. Target별 metric도 만들지 않는다.

6. Object 수·capacity와 relocation 계기

이 절은 Spot과 그 안에서 application message를 처리하는 Actor의 현재 개수와 capacity, 그리고 relocation과 STREAM 연결 계기를 집계한다. Byte stream을 하나의 client와 server가 공유하는 연결 단위는 STREAM session이다.

Actor나 Spot을 다른 node에서 계속 실행할 때 application state를 다시 만들거나 저장해서 복원하는 방법을 relocation policy라고 한다. Actor·Spot을 실제로 실행하고 application queue를 관리하는 MeshNode를 owner라고 한다. 현재 owner와 위치를 판단하는 기준 record를 보관하는 Location Store의 확정값을 capacity 집계에 사용한다.

zlink.spot.countzlink.actor.count는 이 MeshNode가 지금 실행하고 있는 수를 세고, zlink.object.capacity.*zlink.spot.type.capacity.*는 Location Store가 확정한 population을 읽는다. 두 계기는 집계 경계가 달라 서로를 대체하지 않으며 값이 다를 수 있다. Spot 종류를 나타내는 Spot kind와 startup 등록 뒤 바뀌지 않는 type identity인 stable type은 등록값으로만 label에 사용한다. ID로 처음 호출할 때 Framework가 만들 수 있는 Spot을 Instance Spot이라고 한다.

계기 종류 단위 Label 의미
zlink.spot.count updown {spot} mesh_name, spot_kind 현재 Spot 수를 제공한다.
zlink.actor.count updown {actor} mesh_name 현재 Actor 수를 제공한다.
zlink.object.capacity.active observable {object} mesh_name, capacity_scope Location Store가 확정한 active population 수를 제공한다.
zlink.object.capacity.reserved observable {object} mesh_name, capacity_scope Location Store reservation이 확보한 population 수를 제공한다.
zlink.object.capacity.limit observable {object} mesh_name, capacity_scope Actor 전체 또는 Spot 전체 limit을 제공하며, 값이 0이면 제한하지 않는다.
zlink.spot.type.capacity.active observable {spot} mesh_name, spot_kind, stable_type 등록한 Spot type의 active 수를 제공한다.
zlink.spot.type.capacity.reserved observable {spot} mesh_name, spot_kind, stable_type 등록한 Spot type의 reserved 수를 제공한다.
zlink.spot.type.capacity.limit observable {spot} mesh_name, spot_kind, stable_type 등록한 Spot type의 limit을 제공하며, 값이 0이면 별도로 제한하지 않는다.
zlink.object.activation.active observable {activation} mesh_name 현재 factory와 initialization을 실행 중인 수를 제공한다.
zlink.object.activation.limit observable {activation} mesh_name Population capacity와 별도로 적용하는 activation concurrency limit을 제공한다.
zlink.relocation.started counter {relocation} mesh_name, object_kind, policy Actor·Instance Spot relocation을 시작한 횟수를 누적한다.
zlink.relocation.completed counter {relocation} mesh_name, object_kind, policy, outcome Relocation terminal 결과를 누적한다.
zlink.relocation.duration histogram s mesh_name, object_kind, policy, outcome Prepare부터 terminal phase까지 걸린 시간을 기록한다.
zlink.relocation.bytes histogram By mesh_name, object_kind, policy 변경할 수 없는 relocation envelope의 크기를 기록한다.
zlink.stream.connections.active updown {connection} transport 현재 STREAM session 수를 제공한다.
zlink.stream.connections.opened counter {connection} transport STREAM session을 연 횟수를 누적한다.
zlink.stream.connections.closed counter {connection} transport, close_reason STREAM session을 닫은 횟수를 누적한다.
Label 값과 제한
spot_kind 일반 Spot은 entry|user|instance, type capacity는 user|instance다.
capacity_scope actor|spot. Entry Spot 내부 Actor는 actor에 포함한다.
stable_type Startup에 등록하여 개수가 제한된 User·Instance Spot의 stable type만 사용한다.
object_kind actor|user_spot|instance_spot
policy recreate|snapshot
Relocation outcome completed|aborted|failed|shutdown
transport Startup 등록 시점에 정한 허용 값 중 하나다.
close_reason client_close|idle_timeout|heartbeat_timeout|server_shutdown|protocol_error|transport_error

7. Instance Spot activation 계기

Instance Spot은 다음 계기를 추가한다. instance_spot_type은 startup에 등록하여 개수가 제한된 type만 사용한다. Spot 초기화와 최초 message 저장이 끝나기 전에 handler 실행을 막는 activation barrier 앞의 message 수와 byte 수도 집계한다. Actor나 Spot의 현재 위치, owner와 generation을 판단하는 기준 정보를 authority라고 한다. Claim 충돌은 이 기준 정보와 요청의 Spot kind 또는 stable type이 일치하지 않을 때 기록한다.

계기 종류 단위 Label 의미
zlink.instance_spot.activations counter {activation} mesh_name, instance_spot_type, outcome Owner claim부터 Ready 또는 terminal 실패까지의 결과를 누적한다.
zlink.instance_spot.activation.duration histogram s mesh_name, instance_spot_type, outcome 첫 address resolve부터 message를 처리할 수 있는 Ready 상태 또는 terminal 실패까지 걸린 시간을 기록한다.
zlink.instance_spot.pending.messages observable {message} mesh_name, instance_spot_type Activation barrier 앞에서 기다리는 message 수를 제공한다.
zlink.instance_spot.pending.bytes observable By mesh_name, instance_spot_type 생성 결과가 정해질 때까지 최초 message를 보관하는 activation barrier 앞에서 예약한 payload byte 수를 제공한다.
zlink.instance_spot.claim.conflicts counter {claim} mesh_name, instance_spot_type, reason 현재 유효한 authority, Spot kind 또는 stable type이 요청과 충돌한 횟수를 누적한다.
zlink.instance_spot.takeovers counter {takeover} mesh_name, instance_spot_type, outcome 만료된 owner row를 caller claim이 교체한 결과를 누적한다.

Activation outcomeready|rejected|conflict|timed_out|shutdown|store_failure|fenced, claim reasonauthority|spot_kind|spot_type|closing, takeover outcomeclaimed|lost|failed만 허용한다.

8. Host relocation과 shutdown

Host가 새 작업 수락을 중단하고 이미 받은 작업과 resource를 정리하는 절차를 drain이라고 한다. Host Shutdown은 이 정리를 마치고 runtime과 infrastructure를 종료한다. Relocation commit 뒤에도 이전 owner node에 늦게 도착한 message를 새 owner에게 대신 전달하는 동작을 Message Follow라고 한다.

계기 종류 단위 Label 의미
zlink.host.state observable {runtime} state 현재 Framework runtime state 하나에 값 1을 기록한다.
zlink.host.relocation.duration histogram s mode, outcome Host Relocate 시작부터 Relocated 또는 Blocked result까지 걸린 시간을 기록한다.
zlink.host.relocation.blocked counter {operation} mode, reason Blocked로 끝난 host Relocate 수를 누적한다.
zlink.relocation.interruption histogram s unit_kind, 선택형 execution_mode Actor, Instance Spot 또는 User Spot 한 unit의 admission seal부터 one-way cutover submit의 성공 또는 실패 terminal까지 걸린 source-local 시간을 기록한다. unit_kindactor, instance_spot, user_spot이다. 1초 초과를 relocation failure로 바꾸지 않는다.
zlink.relocation.target_resume histogram s unit_kind Target이 한 unit의 Location Store CAS를 확인한 시점부터 그 unit의 application dispatch를 연 시점까지 걸린 target-local 시간을 기록한다.
zlink.relocation.route_convergence histogram s unit_kind 한 unit의 cutover submit terminal부터 그 unit의 Message Follow route를 제거할 수 있는 시점(follow 기간 만료 기준)까지 걸린 source-local 시간을 기록한다. Source가 Message Follow route를 유지해야 하는 기간의 근거다.
zlink.relocation.cutover_timeout counter {fallback} unit_kind Cutover 대기 시간이 끝나 target이 완전성 확인 값 검증 없이 fallback으로 Location Store CAS를 진행한 횟수를 누적한다.
zlink.host.shutdown.duration histogram s outcome Host Shutdown 시작부터 terminal result까지 걸린 시간을 기록한다.
zlink.host.shutdown.forced counter {operation} reason 제한 시간 안에 정리를 끝내려고 남은 작업을 강제로 종료한 host Shutdown 수를 누적한다.

stateRuntime monitoring §3이 정의하는 7값 preparing|serving|relocating|relocated|draining|stopped|error다. Relocation outcomerelocated|blocked다. Shutdown outcomestopped|force_stopped다. Reason은 Host relocation과 shutdown의 식별자를 사용한다.

Relocation 구간 지표는 세 구간을 나눠 기록하며, 각 구간은 정확히 한 node의 local clock으로만 측정한다. 서로 다른 node의 시각을 직접 빼는 지표는 만들지 않는다 — source seal부터 target dispatch 개방까지처럼 node를 가로지르는 전체 중단 구간은 Message flow tracing의 같은 flow 상관으로 관찰한다. 세 구간의 관계는 다음과 같다.

%%{init: {'sequence': {'actorFontSize': '18px', 'messageFontSize': '18px', 'noteFontSize': '18px', 'boxMargin': 8, 'width': 140}, 'themeVariables': {'fontSize': '18px'}}}%%
sequenceDiagram
    participant Source as Source node
    participant Target as Target node

    Note over Source: admission seal (source-local 시각)
    Source->>Source: one-way cutover submit
    Note over Source: cutover submit terminal (성공 또는 실패)
    Note over Source: zlink.relocation.interruption — admission seal ~ cutover submit terminal (source-local)

    Target->>Target: Location Store CAS 확인 (target-local 시각)
    Target->>Target: application dispatch 개방 (target-local 시각)
    Note over Target: zlink.relocation.target_resume — CAS 확인 ~ dispatch 개방 (target-local)

    Note over Source: Message Follow route 제거 가능 시점 (follow 기간 만료, source-local 시각)
    Note over Source: zlink.relocation.route_convergence — cutover submit terminal ~ route 제거 가능 시점 (source-local)
  • Source 정지 구간은 admission seal부터 cutover submit terminal까지이며, zlink.relocation.interruption이 기록하는 구간과 같다. 별도 계기를 추가하지 않는다.
  • Target 재개 구간(zlink.relocation.target_resume)은 target이 자기 clock으로 측정해 자기 지표로 게시한다.
  • Route 수렴 구간(zlink.relocation.route_convergence)은 source가 자기 clock으로 측정해 자기 지표로 게시한다.

개별 relocation을 label로 구분하지 않는 §10의 규칙도 이 지표에 그대로 적용된다. zlink.relocation.cutover_timeout0이 아니면 그 배치에서 relay 순서를 보장하지 않는 fallback 경로가 실제로 사용되고 있다는 뜻이므로, 운영자는 cutover 대기 설정(Framework APIRelocationCutoverWaitTimeout)을 조정하는 판단 기준으로 사용한다.

9. Location과 telemetry

Framework host가 현재 lifecycle의 등록 정보와 object ownership을 계속 사용할 권한은 정해진 시간마다 갱신하는 owner lease로 증명한다.

계기 종류 단위 Label 의미
zlink.location.store.errors counter {error} operation Redis read·write·lease failure 횟수를 누적한다.
zlink.location.owner_lease.renew.failures counter {failure} scope_kind, scope_name Owner lease renew failure 횟수를 누적한다.
zlink.location.owner_lease.renew.lateness histogram s scope_kind, scope_name 예정 시각보다 owner lease renew가 늦어진 시간을 기록한다.
zlink.observability.events.overflow counter {event} source Runtime status와 trace를 전달하는 내부 telemetry queue overflow 횟수를 누적한다.

scope_kindmesh|channel이다. scope_name에는 해당 MeshName이나 ChannelName을 쓴다. operation은 다음 7값으로 닫혀 있다 — read|compare_exchange|relocation_put|relocation_get|relocation_delete|lease_renew|release. Logical Multicast와 classic fanout publish는 집계하지 않는다.

10. Label cardinality

Label에는 startup 등록값이나 enum이 허용한 값만 사용한다.

Classic fanout subscriber가 받을 event 종류를 나누는 문자열을 topic이라고 한다. Spot ID를 비롯한 개별 object·connection·operation identity는 label에 사용하지 않는다.

허용 금지
mesh_name, channel_name, scope_kind, scope_name, 정적 source, surface, message_kind, operation, outcome, reason, mode, object_kind, unit_kind, execution_mode, policy, spot_kind, capacity_scope, 등록된 stable_type, 등록된 instance_spot_type, transport, close_reason, state topic, Actor ID, Spot ID, RID, endpoint, session ID, relocation ID, user ID, correlation ID, flow ID, application metadata value, application state format·version

MeshName, ChannelNamescope_name은 host 등록값으로 닫혀 있을 때만 사용한다. Payload에서 label을 만들지 않는다. 개별 Actor·Spot·message 흐름은 metric이 아니라 Message flow tracing에서 확인한다.

11. 수집 경계

각 언어는 표준 meter 또는 registry를 사용한다. Public API는 exporter, reader, storage와 histogram bucket을 구성하지 않는다.

  • Metric을 끈 경로는 payload를 복사하거나 per-message label dictionary를 만들지 않는다.
  • counter와 updown 갱신은 dispatch ordering을 바꾸지 않는다.
  • Observable은 runtime이 이미 유지하는 제한된 크기의 집계값만 읽는다. Actor·Spot, mailbox 또는 Location Store record 전체를 순회해서 값을 만들지 않는다. 내부 확인 조건: 수집 callback이 object·record 컬렉션을 순회하는 호출부가 없다(코드 검토).
  • Mailbox enqueue·dequeue와 turn마다 counter, timestamp 또는 histogram을 기록하지 않는다.
  • Provider가 histogram bucket과 aggregation을 정한다.
  • Provider callback failure는 마지막 정상 수집 결과를 지나간 처리 단계에 되돌려 적용하지 않는다.

12. 검증 요구

공개 표면(계기 이름·종류·단위·label, 허용 label value)만으로 다음을 확인한다. 각 항목은 구현 또는 contract test 하나로 이어진다.

이름과 단위

  • 계기 이름, 종류, 단위와 허용 label value가 모든 언어에서 같다.
  • Mailbox·Spot·Actor queue와 turn 단위 metric이 존재하지 않는다.
  • Controlled DEALER-ROUTER reply byte delta는 zlink.host.core_hwm.accounted에 나타나고 zlink.host.core_hwm.completion_accounted에는 나타나지 않는다. ROUTER-ROUTER reply byte는 Completion metric에 나타나며 metric 이름과 label은 topology에 따라 바뀌지 않는다.

Label

  • topic, Actor ID, Spot ID, RID, endpoint, correlation ID와 flow ID가 어떤 metric label에도 나타나지 않는다.

Relocation과 host lifecycle

  • Telemetry queue overflow와 provider failure가 dispatch와 host lifecycle 결과를 바꾸지 않는다.
  • Host 계기와 label은 Host relocation과 shutdown의 result와 일치한다.
  • Relocation 구간 지표는 각 node가 자기 local clock으로 측정하며, 서로 다른 node의 시각을 직접 뺀 지표가 없다. zlink.relocation.cutover_timeout은 검증 없이 진행한 fallback CAS 횟수와 일치한다.
  • Instance activation은 등록된 type 단위로 관찰하며 Spot ID·owner ID·generation은 label에서 제외한다.
  • Instance one-way activation 실패는 surface=instance_spot drop이며 reply나 replay를 만들지 않는다.

공개 표면 범위

  • Public Framework interface에 exporter, reader, storage, bucket과 metric event DTO가 나타나지 않는다.

Observability 주제 목차 · 스펙 목차 · 이전: 01. Runtime 상태와 운영 진단 · 다음: 03. Message flow tracing