Files
progcode/web/public/assets/editorial/2020/structured-log-event-2020.svg
T
huncode 8ae2b93876
Build and deploy / deploy (push) Successful in 13s
revise July 2020 logging articles
2026-07-31 11:36:52 +03:00

49 lines
4.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="1280" viewBox="0 0 720 1280" role="img" aria-labelledby="title desc">
<title id="title">Контракт одного структурированного события</title>
<desc id="desc">Вертикальная схема показывает, как одно JSON-событие собирается из обязательных полей, идентификатора запроса, локального HTTP-контекста и redaction перед записью.</desc>
<defs>
<linearGradient id="background" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#071c2c"/>
<stop offset="1" stop-color="#102a43"/>
</linearGradient>
<marker id="arrow" markerWidth="12" markerHeight="12" refX="10" refY="6" orient="auto">
<path d="M0,0 L12,6 L0,12 Z" fill="#64d9c2"/>
</marker>
</defs>
<rect width="720" height="1280" fill="url(#background)"/>
<text x="64" y="72" fill="#d9faff" font-family="Arial, sans-serif" font-size="34" font-weight="700">ОДНО СОБЫТИЕ = ОДИН ФАКТ</text>
<text x="64" y="108" fill="#91b8ca" font-family="Arial, sans-serif" font-size="22">Учебный JSON-контракт для одного request_id</text>
<rect x="56" y="154" width="608" height="206" rx="24" fill="#12344d" stroke="#64d9c2" stroke-width="2"/>
<text x="88" y="200" fill="#64d9c2" font-family="Arial, sans-serif" font-size="24" font-weight="700">1. БАЗОВЫЕ ПОЛЯ</text>
<text x="88" y="244" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">timestamp · level · service</text>
<text x="88" y="280" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">environment · короткое message</text>
<text x="88" y="326" fill="#b9d9e6" font-family="Arial, sans-serif" font-size="22">Одинаковый смысл в каждом модуле</text>
<path d="M360 360 L360 414" stroke="#64d9c2" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="56" y="432" width="608" height="194" rx="24" fill="#12344d" stroke="#73a7ff" stroke-width="2"/>
<text x="88" y="478" fill="#9bc0ff" font-family="Arial, sans-serif" font-size="24" font-weight="700">2. СВЯЗЬ ОДНОГО ЗАПРОСА</text>
<text x="88" y="524" fill="#ffffff" font-family="Arial, sans-serif" font-size="28" font-weight="700">event</text>
<text x="88" y="562" fill="#ffffff" font-family="Arial, sans-serif" font-size="28" font-weight="700">request_id</text>
<text x="88" y="602" fill="#b9d9e6" font-family="Arial, sans-serif" font-size="22">Имя из словаря, id — только для поиска</text>
<path d="M360 626 L360 680" stroke="#64d9c2" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="56" y="698" width="608" height="210" rx="24" fill="#12344d" stroke="#f5bd6a" stroke-width="2"/>
<text x="88" y="744" fill="#f5bd6a" font-family="Arial, sans-serif" font-size="24" font-weight="700">3. ЛОКАЛЬНЫЙ КОНТЕКСТ</text>
<text x="88" y="790" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">http.method · http.route</text>
<text x="88" y="826" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">http.status_code · error.code</text>
<text x="88" y="872" fill="#b9d9e6" font-family="Arial, sans-serif" font-size="22">Только поля владельца операции</text>
<path d="M360 908 L360 962" stroke="#64d9c2" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="56" y="980" width="608" height="210" rx="24" fill="#1b3045" stroke="#ff8d8d" stroke-width="2"/>
<text x="88" y="1026" fill="#ffaaaa" font-family="Arial, sans-serif" font-size="24" font-weight="700">4. ДО ЗАПИСИ В JSON</text>
<text x="88" y="1072" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">redact: authorization, cookie, token</text>
<text x="88" y="1108" fill="#ffffff" font-family="Arial, sans-serif" font-size="25">route — шаблон, не полный URL</text>
<text x="88" y="1154" fill="#b9d9e6" font-family="Arial, sans-serif" font-size="22">Сначала форма события, потом stdout</text>
<text x="64" y="1240" fill="#91b8ca" font-family="Arial, sans-serif" font-size="22">Синтетический пример · не production-данные</text>
</svg>