Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-telemetry-sampling-algorithms

Telemetry Sampling Algorithms (Head, Tail, Priority & Adaptive)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Telemetry Sampling Algorithms (Head, Tail, Priority & Adaptive) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-telemetry-sampling-algorithms/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-telemetry-sampling-algorithms)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-telemetry-sampling-algorithms)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-telemetry-sampling-algorithms" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Telemetry Sampling Algorithms (Head, Tail, Priority & Adaptive) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Trace / Log Stream"]
  n1_1["Consistent Hash Head"]
  n2a_2[("Tail Policy Buffer")]
  n2b_3["Adaptive Rate Limiter"]
  n3_4[("Sampled OTel Backend")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Head check · Hash"| n1_1
  n1_1 -->|"2a. Buffer · RAM"| n2a_2
  n1_1 -->|"2b. Adjust % · PID"| n2b_3
  n2a_2 -->|"3a. Export · OTLP"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Trace / Log StreamSTATELESS
    High-QPS Spans
  • Consistent Hash HeadSTATELESS
    Deterministic trace_id hash %
  • Tail Policy BufferSTATEFUL
    Holds trace 15s -> keep errors
  • Adaptive Rate LimiterSTATELESS
    Caps spans/sec per service
  • Sampled OTel BackendSTATEFUL
    100% 5xx/slow + 2% healthy
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Trace / Log Stream → Consistent Hash Head (Head check)[Hash]
  2. Consistent Hash Head → Tail Policy Buffer (Buffer)[RAM]
  3. Consistent Hash Head → Adaptive Rate Limiter (Adjust %)[PID]
  4. Tail Policy Buffer → Sampled OTel Backend (Export)[OTLP]
  5. Adaptive Rate Limiter → Sampled OTel Backend (Merge)[RAM]
  6. Sampled OTel Backend → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →