From a268a56acbd0cf2c3ba8c30abb0b294806a08f70 Mon Sep 17 00:00:00 2001 From: Joey <90795735+joey-grafana@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:51:43 +0100 Subject: [PATCH] Tempo: Put trace results data frame first when streaming (#93739) * Put trace results dataframe first * Add comment --- public/app/plugins/datasource/tempo/streaming.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/tempo/streaming.ts b/public/app/plugins/datasource/tempo/streaming.ts index 71c336edf2f..333faca7388 100644 --- a/public/app/plugins/datasource/tempo/streaming.ts +++ b/public/app/plugins/datasource/tempo/streaming.ts @@ -84,9 +84,12 @@ export function doTempoChannelStream( throw new Error(error); } + // The order of the frames is important. The metrics frame should always be the last frame. + // This is because the metrics frame is used to display the progress of the streaming query + // and we would like to display the results first. frames = [ - metricsDataFrame(metrics, frameState, elapsedTime), ...formatTraceQLResponse(traces, instanceSettings, query.tableType), + metricsDataFrame(metrics, frameState, elapsedTime), ]; } return {