mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1816] [CLOSED] Opt-in OTLP traces of every /v1 request (0.1.41), plus the docs pages 0.1.41 left uncovered #3694
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3694
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1816
Author: @Buddychek
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:pr/0.1.41-otel-traces📝 Commits (10+)
dff0d0bdocs: the 0.1.41 switches that no page listed6fe21f7docs: markdown hygiene in DETAILS.md - spaced table delimiters, code fences with a language, the tier figure as a markdown image1921dbddocs: the 0.1.41 watchdog, body-cap and batch-groups behaviors no page hadd16611bdocs: the three new troubleshooting rows match the table's two columns74b1cf6docs: card order on AMD/Linux too (KFD topology SIMDs x clock); STRATA_DUMP_FIRST_LOGITS next to the research hooks63bf830serve: opt-in OTLP traces of every /v1 request; CMake CMP0169 pina28f334docs: the 0.1.41 opt-in OTLP tracing no page covered; markdown hygienee468ef2docs: markdown hygiene in the staged rows; .gitignore for .history and .github/agentsba3b504serve: make the OTLP tracing tests run; fix the three bugs they then found6440a5cdocs: the 0.1.41 tracing clamp, root-span parent and shutdown drain no page had📊 Changes
12 files changed (+948 additions, -113 deletions)
View changed files
📝
CMakeLists.txt(+7 -0)📝
SECURITY.md(+5 -0)📝
docs/BATCHING.md(+6 -5)📝
docs/DETAILS.md(+131 -18)📝
docs/MULTI_GPU.md(+15 -71)📝
docs/SECOND_GPU.md(+21 -0)📝
docs/TROUBLESHOOTING.md(+15 -0)📝
serve/runconfig.py(+11 -0)📝
serve/server.py(+51 -19)➕
serve/test_tracing.py(+353 -0)➕
serve/tracing.py(+326 -0)📝
sycl/CMakeLists.txt(+7 -0)📄 Description
Title
Opt-in OTLP traces of every /v1 request (0.1.41), plus the docs pages 0.1.41 left uncovered
Issue: Resolves #
Summary
Adds the opt-in OTLP tracing that 0.1.41 shipped in
serve/as a tested, documented feature, and covers the 0.1.41 behaviors no page documented: one trace per/v1request exported as OTLP/HTTP JSON, the switches no page listed, the watchdog/body-cap/batch-groups behaviors, the AMD/Linux card order, and the markdown hygiene around them. Off by default: with no endpoint set, the request path is byte-identical to the release build.What changed
serve/tracing.py (new) — one OpenTelemetry trace per request, built from the seconds the Monitor already measures (queue, load, prefill, decode) and exported as OTLP/HTTP JSON on its own thread, so a down collector never blocks a request. A client
traceparentbecomes the root span's parent; every answer carries its owntraceparent. With tracing on and the monitor off, timings and token counts only — no prompt or answer text reaches a collector. OTLP/HTTP is written as JSON by hand: tracing adds no package to the install. Enable with--trace-otlp,"trace_otlp"in the run config, or$STRATA_TRACE_OTLP("default" = http://localhost:4318/v1/traces).serve/server.py, serve/runconfig.py — the tracing hooks in the request path (begin/finish, the answer's traceparent header, trace-only records with the monitor off) and the runconfig endpoint validation with the same check the server applies at start.
serve/test_tracing.py (new, 9 tests) — collector stand-in, per-request span tree, W3C context both ways, dead-collector survival, endpoint precedence (CLI > config > env), off-by-default. 9/9 pass.
CMakeLists.txt, sycl/CMakeLists.txt — pin CMP0169 OLD around the FetchContent of strata_llamacpp (CMake 3.30 deprecates FetchContent_Populate(); CMake 4.4 warns every configure), guarded so CMake < 3.30 still configures.
docs/ — DETAILS.md: the tracing section and the 0.1.41 switches no page listed, card order on AMD/Linux (KFD topology SIMDs x clock), STRATA_DUMP_FIRST_LOGITS next to the research hooks, markdown hygiene (spaced table delimiters, fenced code with a language, the tier figure as a markdown image). TROUBLESHOOTING.md: the tracing row, the watchdog/body-cap/batch-groups behaviors, the gcc/glibc row in the table's two-column shape. BATCHING.md, MULTI_GPU.md, SECOND_GPU.md: the batch-groups and card-order rows they were missing.
Extra Notes
Tested on Python 3.15 (venv), no GPU: serve.test_tracing 9/9; serve.test_server + test_monitor + test_runconfig + test_request_accounting 297/297; all together 306/306 on this branch's base (
fb58e0d). Tracing is opt-in and the default path is untouched. Not tested: the CMake pins on a CMake < 3.30 machine (the guard is by reading; the 3.30+ warning path is seen on every configure of this build), and the OTLP collector round-trip against a real Jaeger/Tempo.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.