From fac32879121640dd695dfd20959fa75070568608 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 13 May 2026 12:16:41 +0100 Subject: [PATCH] fix(telemetry): use .batches for Tempo trace lookup in integration test Tempo /api/traces/{id} returns OTLP-shaped JSON with a top-level "batches" key, not "data". The cross-check in check_log_correlation was querying jq '.data | length' which always returned null, causing the Log-Tempo cross-check to fail even when the trace existed. --- docker/telemetry/integration-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/telemetry/integration-test.sh b/docker/telemetry/integration-test.sh index 7698a95bd1..10d45e697c 100755 --- a/docker/telemetry/integration-test.sh +++ b/docker/telemetry/integration-test.sh @@ -103,8 +103,9 @@ check_log_correlation() { # Cross-check: verify the sample trace_id exists in Tempo if [ -n "$sample_trace_id" ]; then local trace_found + # Tempo /api/traces/{id} returns OTLP shape: {"batches":[...]} trace_found=$(curl -sf "$TEMPO/api/traces/$sample_trace_id" \ - | jq '.data | length' 2>/dev/null) || trace_found=0 + | jq '.batches | length' 2>/dev/null) || trace_found=0 if [ "$trace_found" -gt 0 ]; then ok "Log-Tempo cross-check: trace_id=$sample_trace_id found in Tempo" else