diff --git a/lib/host/otel.sx b/lib/host/otel.sx index 08539ba2..3d0c1b3a 100644 --- a/lib/host/otel.sx +++ b/lib/host/otel.sx @@ -213,11 +213,15 @@ (fn (status) (if (= status "error") "#e45756" "#4c9a8f"))) ;; one (bar + name + duration) per rect. The bar is the only , so -;; count(rect) == count(span); axis chrome uses /. +;; count(rect) == count(span); axis chrome uses /. A leading +;; gives a native hover tooltip with the full span name (the inline label clips on +;; narrow bars). (define otel/-rect->g (fn (r) (quasiquote (g + (title (unquote (str (get r :name) " · " (otel/-ms (get r :dur)) + (if (= (get r :status) "error") " · error" "")))) (rect :x (unquote (get r :x)) :y (unquote (get r :y)) :width (unquote (get r :w)) :height (unquote (- otel/-row-h 2)) :fill (unquote (otel/-bar-fill (get r :status))) :rx 2)