revise September 2023 telemetry articles
Build and deploy / deploy (push) Successful in 15s

This commit is contained in:
2026-07-31 15:13:05 +03:00
parent 3d310bd605
commit 2c860caddd
7 changed files with 693 additions and 1 deletions
@@ -0,0 +1,52 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720" role="img" aria-labelledby="title desc">
<title id="title">Учебный budget metric labels и запрет per-request identifiers</title>
<desc id="desc">Слева три metric labels с фиксированным словарём service, route и outcome. Справа идентификаторы trace, request, user и текст ошибки перечёркнуты как неподходящие для labels и направлены в отдельный trace/log контекст.</desc>
<defs>
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto"><path d="M0 0L12 6L0 12Z" fill="#138b6d"/></marker>
<style>
.bg { fill: #f8fafc; }
.panel { fill: #fff; stroke: #d9e1ed; stroke-width: 3; }
.good { fill: #e8fbf5; stroke: #138b6d; stroke-width: 3; }
.bad { fill: #fff0f1; stroke: #dc3d4b; stroke-width: 3; }
.context { fill: #e6eaff; stroke: #5b6cff; stroke-width: 3; }
.label { font: 700 35px Arial, sans-serif; fill: #17213a; }
.sub { font: 500 25px Arial, sans-serif; fill: #42516c; }
.mono { font: 600 25px Menlo, Consolas, monospace; fill: #17213a; }
.tiny { font: 500 21px Arial, sans-serif; fill: #58667d; }
.arrow { fill: none; stroke: #138b6d; stroke-width: 5; marker-end: url(#arrow); }
.cross { stroke: #dc3d4b; stroke-width: 7; stroke-linecap: round; }
</style>
</defs>
<rect class="bg" width="1200" height="720" rx="28"/>
<text x="58" y="70" class="label">Metric labels: маленький словарь, не поиск одного запроса</text>
<text x="58" y="108" class="sub">Budget — проектный договор; это не расчёт real series или backend limit</text>
<rect x="58" y="154" width="524" height="500" rx="26" class="panel"/>
<text x="88" y="208" class="label">Разрешённые dimensions</text>
<text x="88" y="245" class="sub">фиксированные synthetic values</text>
<rect x="90" y="281" width="458" height="74" rx="16" class="good"/>
<text x="118" y="327" class="mono">service = checkout-api</text>
<rect x="90" y="378" width="458" height="74" rx="16" class="good"/>
<text x="118" y="424" class="mono">route = checkout</text>
<rect x="90" y="475" width="458" height="74" rx="16" class="good"/>
<text x="118" y="521" class="mono">outcome = rejected</text>
<text x="92" y="604" class="tiny">Metric отвечает: «какой класс исхода?»</text>
<rect x="650" y="154" width="492" height="500" rx="26" class="panel"/>
<text x="680" y="208" class="label">Не класть в labels</text>
<text x="680" y="245" class="sub">per-request или свободный контекст</text>
<rect x="682" y="281" width="426" height="58" rx="14" class="bad"/>
<text x="708" y="319" class="mono">trace_id</text>
<path d="M1000 287L1087 333M1087 287L1000 333" class="cross"/>
<rect x="682" y="359" width="426" height="58" rx="14" class="bad"/>
<text x="708" y="397" class="mono">request_id / order_id</text>
<path d="M1000 365L1087 411M1087 365L1000 411" class="cross"/>
<rect x="682" y="437" width="426" height="58" rx="14" class="bad"/>
<text x="708" y="475" class="mono">user_id</text>
<path d="M1000 443L1087 489M1087 443L1000 489" class="cross"/>
<rect x="682" y="515" width="426" height="58" rx="14" class="bad"/>
<text x="708" y="553" class="mono">error text / raw URL</text>
<path d="M1000 521L1087 567M1087 521L1000 567" class="cross"/>
<path d="M583 406H645" class="arrow"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,61 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720" role="img" aria-labelledby="title desc">
<title id="title">Учебная карта корреляции log, metric и trace</title>
<desc id="desc">Один synthetic trace ID связывает gateway span, payment span, event log и карточку evidence. Рядом metric содержит только service, route и outcome и намеренно не содержит trace ID.</desc>
<defs>
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto"><path d="M0 0L12 6L0 12Z" fill="#5b6cff"/></marker>
<style>
.bg { fill: #f6f8ff; }
.panel { fill: #ffffff; stroke: #d8dff7; stroke-width: 3; }
.trace { fill: #e6eaff; stroke: #5b6cff; stroke-width: 3; }
.log { fill: #e8fbf5; stroke: #138b6d; stroke-width: 3; }
.metric { fill: #fff4df; stroke: #d77a00; stroke-width: 3; }
.evidence { fill: #f3ecff; stroke: #8b5cf6; stroke-width: 3; }
.line { fill: none; stroke: #5b6cff; stroke-width: 5; marker-end: url(#arrow); }
.small-line { fill: none; stroke: #8b5cf6; stroke-width: 4; stroke-dasharray: 10 8; marker-end: url(#arrow); }
.label { font: 700 34px Arial, sans-serif; fill: #15213d; }
.sub { font: 500 25px Arial, sans-serif; fill: #33415f; }
.mono { font: 600 24px Menlo, Consolas, monospace; fill: #17213a; }
.tiny { font: 500 21px Arial, sans-serif; fill: #495875; }
.cross { stroke: #dc3d4b; stroke-width: 8; stroke-linecap: round; }
</style>
</defs>
<rect class="bg" width="1200" height="720" rx="28"/>
<text x="58" y="70" class="label">Один correlation key, разные роли сигналов</text>
<text x="58" y="108" class="sub">Учебный сценарий: synthetic checkout authorization rejected</text>
<rect x="58" y="152" width="596" height="305" rx="24" class="panel"/>
<text x="88" y="202" class="label">Trace: путь причины</text>
<text x="88" y="238" class="mono">traceId: synthetic-trace-2023-09-A</text>
<rect x="92" y="276" width="224" height="118" rx="18" class="trace"/>
<text x="117" y="321" class="label">gateway span</text>
<text x="117" y="358" class="mono">span-gateway-A</text>
<rect x="394" y="276" width="224" height="118" rx="18" class="trace"/>
<text x="416" y="321" class="label">payment span</text>
<text x="418" y="358" class="mono">span-payment-A</text>
<path d="M317 335H385" class="line"/>
<text x="283" y="431" class="tiny">child span: gateway → payment</text>
<rect x="718" y="152" width="424" height="305" rx="24" class="metric"/>
<text x="748" y="202" class="label">Metric: класс исхода</text>
<text x="748" y="241" class="mono">rejected.total = 1</text>
<text x="748" y="290" class="sub">labels с малым словарём:</text>
<text x="748" y="328" class="mono">service = checkout-api</text>
<text x="748" y="362" class="mono">route = checkout</text>
<text x="748" y="396" class="mono">outcome = rejected</text>
<text x="748" y="432" class="tiny">не отвечает на вопрос об одном request</text>
<rect x="58" y="514" width="520" height="152" rx="24" class="log"/>
<text x="88" y="559" class="label">Log/event: контекст шага</text>
<text x="88" y="598" class="mono">traceId + spanId + event attributes</text>
<text x="88" y="632" class="tiny">payment.authorization-rejected</text>
<path d="M504 395C494 445 358 471 314 510" class="small-line"/>
<rect x="680" y="514" width="462" height="152" rx="24" class="evidence"/>
<text x="710" y="559" class="label">Evidence: граница вывода</text>
<text x="710" y="598" class="mono">same trace → same scenario</text>
<text x="710" y="632" class="tiny">not-a-production-observation</text>
<path d="M579 590H668" class="small-line"/>
<text x="790" y="480" class="mono" fill="#dc3d4b">trace ID ≠ metric label</text>
<path d="M1064 482L1124 508M1124 482L1064 508" class="cross"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,57 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720" role="img" aria-labelledby="title desc">
<title id="title">Учебный маршрут диагностики между metric, trace и log event</title>
<desc id="desc">Сначала маленькая synthetic metric задаёт класс исхода. Затем общий trace ID ведёт к gateway и payment span, после чего log event с теми же trace и span IDs объясняет payment отказ. Карточка evidence сохраняет статус not-a-production-observation. Ветка trace ID как metric label перечёркнута.</desc>
<defs>
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto"><path d="M0 0L12 6L0 12Z" fill="#5b6cff"/></marker>
<style>
.bg { fill: #f7f8fc; }
.metric { fill: #fff4df; stroke: #d77a00; stroke-width: 3; }
.trace { fill: #e6eaff; stroke: #5b6cff; stroke-width: 3; }
.log { fill: #e8fbf5; stroke: #138b6d; stroke-width: 3; }
.evidence { fill: #f3ecff; stroke: #8b5cf6; stroke-width: 3; }
.label { font: 700 33px Arial, sans-serif; fill: #17213a; }
.sub { font: 500 24px Arial, sans-serif; fill: #42516c; }
.mono { font: 600 23px Menlo, Consolas, monospace; fill: #17213a; }
.tiny { font: 500 20px Arial, sans-serif; fill: #55627b; }
.arrow { fill: none; stroke: #5b6cff; stroke-width: 5; marker-end: url(#arrow); }
.dash { fill: none; stroke: #8b5cf6; stroke-width: 4; stroke-dasharray: 10 8; marker-end: url(#arrow); }
.cross { stroke: #dc3d4b; stroke-width: 7; stroke-linecap: round; }
</style>
</defs>
<rect class="bg" width="1200" height="720" rx="28"/>
<text x="56" y="68" class="label">Маршрут: симптом → причина → проверка → действие</text>
<text x="56" y="106" class="sub">Один fixed synthetic scenario; каждая стрелка требует отдельной реальной проверки позднее</text>
<rect x="54" y="160" width="244" height="220" rx="24" class="metric"/>
<text x="82" y="207" class="label">1. Metric</text>
<text x="82" y="247" class="mono">outcome=rejected</text>
<text x="82" y="282" class="mono">route=checkout</text>
<text x="82" y="330" class="tiny">вопрос: какой класс?</text>
<rect x="392" y="160" width="340" height="220" rx="24" class="trace"/>
<text x="420" y="207" class="label">2. Trace</text>
<text x="420" y="247" class="mono">synthetic-trace-A</text>
<text x="420" y="285" class="sub">gateway span → payment span</text>
<text x="420" y="330" class="tiny">вопрос: какой путь?</text>
<rect x="826" y="160" width="320" height="220" rx="24" class="log"/>
<text x="854" y="207" class="label">3. Log/event</text>
<text x="854" y="247" class="mono">same trace + span</text>
<text x="854" y="285" class="sub">authorization-rejected</text>
<text x="854" y="330" class="tiny">вопрос: что случилось?</text>
<path d="M300 270H382" class="arrow"/>
<path d="M734 270H816" class="arrow"/>
<text x="315" y="238" class="tiny">не per-request label</text>
<text x="748" y="238" class="tiny">correlation key</text>
<rect x="345" y="482" width="510" height="142" rx="24" class="evidence"/>
<text x="378" y="530" class="label">4. Evidence card</text>
<text x="378" y="570" class="mono">not-a-production-observation</text>
<text x="378" y="606" class="tiny">записать hypothesis и нужную проверку</text>
<path d="M985 382C967 438 842 459 798 478" class="dash"/>
<text x="70" y="473" class="mono" fill="#dc3d4b">trace_id as metric label</text>
<path d="M60 493L295 529M295 493L60 529" class="cross"/>
<text x="56" y="602" class="tiny">Не заменять missing correlation новым identifier в счётчике.</text>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB