otel: robust SPA poll — stable #otel-body polls /otel/fragment (innerHTML)

This commit is contained in:
2026-07-01 20:48:15 +00:00
parent 44d29866e7
commit 2785a14ece
2 changed files with 35 additions and 11 deletions

View File

@@ -235,7 +235,16 @@
(host-ot-test "dashboard SSRs the waterfall svg" (contains? host-ot-dash "<svg") true)
(host-ot-test "dashboard shows a route in the strip" (contains? host-ot-dash "/feed") true)
(host-ot-test "dashboard self-refreshes via SPA poll (sx-trigger)" (contains? host-ot-dash "every 3s") true)
(host-ot-test "dashboard poll targets itself" (contains? host-ot-dash "otel-dashboard") true)
(host-ot-test "dashboard polls the fragment endpoint" (contains? host-ot-dash "/otel/fragment") true)
(host-ot-test "dashboard has a stable polling body" (contains? host-ot-dash "otel-body") true)
;; the poll endpoint: the refreshing body as text/sx
(define host-ot-frag
((dream-route-handler otel/dashboard-fragment-route) (dream-request "GET" "/otel/fragment" {} "")))
(host-ot-test "GET /otel/fragment is text/sx"
(contains? (str (dream-headers host-ot-frag)) "text/sx") true)
(host-ot-test "GET /otel/fragment serves the latency chart"
(contains? (dream-resp-body host-ot-frag) "latency by route") true)
(host-ot-test "dashboard shows the latency chart legend" (contains? host-ot-dash "p99 (tail)") true)
;; the SSE endpoint emits a span event, SSE-framed