Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: fixed tables view not honouring order by in traces explorer (#6769)

SagarRajput-7efc8c95d598b
diff --git a/frontend/src/lib/query/createTableColumnsFromQuery.ts b/frontend/src/lib/query/createTableColumnsFromQuery.ts
index 190f7996aa..ff5ee7a9ad 100644
--- a/frontend/src/lib/query/createTableColumnsFromQuery.ts
+++ b/frontend/src/lib/query/createTableColumnsFromQuery.ts
@@ -572,29 +572,6 @@ export const createTableColumnsFromQuery: CreateTableDataFromQuery = ({
a.queryName < b.queryName ? -1 : 1,
);
- // the reason we need this is because the filling of values in rows doesn't account for mismatch enteries
- // in the response. Example : Series A -> [label1, label2] and Series B -> [label2,label1] this isn't accounted for
- sortedQueryTableData.forEach((q) => {
- q.series?.forEach((s) => {
- s.labelsArray?.sort((a, b) =>
- Object.keys(a)[0] < Object.keys(b)[0] ? -1 : 1,
- );
- });
- q.series?.sort((a, b) => {
- let labelA = '';
- let labelB = '';
- a.labelsArray?.forEach((lab) => {
- labelA += Object.values(lab)[0];
- });
-
- b.labelsArray?.forEach((lab) => {
- labelB += Object.values(lab)[0];
- });
-
- return labelA < labelB ? -1 : 1;
- });
- });
-
const dynamicColumns = getDynamicColumns(sortedQueryTableData, query);
const { filledDynamicColumns, rowsLength } = fillColumnsData(