mirror of
https://github.com/taoensso/telemere.git
synced 2025-12-16 17:41:12 +00:00
[fix] OpenTelemetry handler: add missing line info to output
Previous code was a vestigial leftover from when signals
had {:line <num> :column <num> ...} rather than
{:coords [<line-num> <column-num>] ...}
This commit is contained in:
parent
3366b2b040
commit
13d16d9378
1 changed files with 4 additions and 4 deletions
|
|
@ -219,15 +219,15 @@
|
||||||
|
|
||||||
(if (or common-attrs trace-attrs)
|
(if (or common-attrs trace-attrs)
|
||||||
(let [ab (Attributes/builder)]
|
(let [ab (Attributes/builder)]
|
||||||
(when-let [ns (get signal :ns)] (.put ab "ns" (str ns)))
|
(when-let [ns (get signal :ns)] (.put ab "ns" (str ns)))
|
||||||
(when-let [line (get signal :line)] (.put ab "line" (long line)))
|
(when-let [line (enc/get-in* signal [:coords 0])] (.put ab "line" (long line)))
|
||||||
(when-let [attrs common-attrs] (put-attrs! ab attrs))
|
(when-let [attrs common-attrs] (put-attrs! ab attrs))
|
||||||
(when-let [attrs trace-attrs] (put-attrs! ab attrs))
|
(when-let [attrs trace-attrs] (put-attrs! ab attrs))
|
||||||
(.build ab))
|
(.build ab))
|
||||||
|
|
||||||
;; Common case
|
;; Common case
|
||||||
(when-let [ns (get signal :ns)]
|
(when-let [ns (get signal :ns)]
|
||||||
(if-let [line (get signal :line)]
|
(if-let [line (enc/get-in* signal [:coords 0])]
|
||||||
(Attributes/of ak-ns ns, ak-line (long line))
|
(Attributes/of ak-ns ns, ak-line (long line))
|
||||||
(Attributes/of ak-ns ns)))))))
|
(Attributes/of ak-ns ns)))))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue