From 0205a7a41296c4c5461e05023e46919850117f3a Mon Sep 17 00:00:00 2001 From: adagradschool Date: Thu, 19 Mar 2026 18:21:28 -0400 Subject: [PATCH] Fix jq 1.6 compat: rename $end variable to $end_time `$end` is a reserved keyword in jq 1.6 (shipped with Debian bookworm), causing build_span_json to silently fail and produce empty spans. Renaming to `$end_time` fixes compatibility with jq 1.6+. Co-Authored-By: Claude Opus 4.6 (1M context) --- plugins/trace/hooks/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/trace/hooks/lib.sh b/plugins/trace/hooks/lib.sh index d4678d7..4dfb07b 100755 --- a/plugins/trace/hooks/lib.sh +++ b/plugins/trace/hooks/lib.sh @@ -500,7 +500,7 @@ build_span_json() { --arg name "$name" \ --arg kind "$kind" \ --arg start "$start_ns" \ - --arg end "$end_ns" \ + --arg end_time "$end_ns" \ --argjson attributes "$attrs_json" \ '{ traceId: $trace_id, @@ -509,7 +509,7 @@ build_span_json() { name: $name, kind: $kind, startTimeUnixNano: $start, - endTimeUnixNano: $end, + endTimeUnixNano: $end_time, attributes: ( $attributes | to_entries