otel: waterfall time ruler + recent-traces show actual target path & duration
This commit is contained in:
@@ -158,7 +158,8 @@
|
||||
(define host-ot-svg (otel/waterfall host-ot-tid))
|
||||
(host-ot-test "waterfall head is svg" (str (first host-ot-svg)) "svg")
|
||||
(host-ot-test "svg has one rect per span" (otel/-tree-count host-ot-svg "rect") 4)
|
||||
(host-ot-test "svg has one label per span" (otel/-tree-count host-ot-svg "text") 4)
|
||||
(host-ot-test "svg has at least one label per span" (>= (otel/-tree-count host-ot-svg "text") 4) true)
|
||||
(host-ot-test "waterfall has a time ruler (gridlines)" (> (otel/-tree-count host-ot-svg "line") 0) true)
|
||||
|
||||
;; unknown trace → empty waterfall, still a valid svg
|
||||
(host-ot-test "unknown trace has no rects" (len (otel/waterfall-rects "no-such-trace")) 0)
|
||||
@@ -218,6 +219,12 @@
|
||||
(host-ot-test "recent-traces lists both" (len (otel/recent-traces)) 2)
|
||||
(host-ot-test "recent-traces newest first"
|
||||
(get (first (otel/recent-traces)) :name) "GET /health")
|
||||
(host-ot-test "recent-traces carries the actual target path"
|
||||
(get (first (otel/recent-traces)) :target) "/health")
|
||||
(host-ot-test "recent-traces carries a wall duration"
|
||||
(>= (get (first (otel/recent-traces)) :dur) 0) true)
|
||||
(host-ot-test "request span records http.target"
|
||||
(get (get (last (otel/recent)) :attrs) :http.target) "/health")
|
||||
(host-ot-test "latest-trace is the /health trace"
|
||||
(otel/-trace-root-name (otel/latest-trace)) "GET /health")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user