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: added default fallback for selectedColumns, when the attributeKeys call gives empty (#5847)

SagarRajput-74214e36d22f6
diff --git a/frontend/src/container/OptionsMenu/useOptionsMenu.ts b/frontend/src/container/OptionsMenu/useOptionsMenu.ts
index 7b3cfce035..a4a91d82f4 100644
--- a/frontend/src/container/OptionsMenu/useOptionsMenu.ts
+++ b/frontend/src/container/OptionsMenu/useOptionsMenu.ts
@@ -140,6 +140,11 @@ const useOptionsMenu = ({
return col;
})
.filter(Boolean) as BaseAutocompleteData[];
+
+ // this is the last point where we can set the default columns and if uptil now also we have an empty array then we will set the default columns
+ if (!initialSelected || !initialSelected?.length) {
+ initialSelected = defaultTraceSelectedColumns;
+ }
}
return initialSelected || [];