Tempo: Put trace results data frame first when streaming (#93739)

* Put trace results dataframe first

* Add comment
This commit is contained in:
Joey 2024-10-10 15:51:43 +01:00 committed by GitHub
parent 42eb033b03
commit a268a56acb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {