Print all tags, but limit size to 400 characters

This prevents the system from completely blowing up if large events are
dispatched.
This commit is contained in:
Daniel Compton 2017-08-25 09:15:23 +12:00
parent ec946ea7eb
commit a989ad0580
1 changed files with 5 additions and 3 deletions

View File

@ -179,9 +179,11 @@
(.toFixed duration 1) " ms"]]
(when show-row?
[:tr {:key (str id "-details")}
[:td {:col-span 3} (with-out-str (pprint/pprint (if-let [params (:event tags)]
params
(dissoc tags :query-v :duration))))]]))))))
[:td {:col-span 3} (let [tag-str (with-out-str (pprint/pprint tags))
string-size-limit 400]
(if (< string-size-limit (count tag-str))
(str (subs tag-str 0 string-size-limit) " ...")
tag-str))]]))))))
(defn render-trace-panel []
(let [filter-input (r/atom "")