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: trace filter groupby selection is breaking the FE

Pranshu Chittora5e02bfe2e483
diff --git a/frontend/src/container/Trace/Graph/config.ts b/frontend/src/container/Trace/Graph/config.ts
index 08744821cb..2c3387a834 100644
--- a/frontend/src/container/Trace/Graph/config.ts
+++ b/frontend/src/container/Trace/Graph/config.ts
@@ -1,6 +1,7 @@
import { ChartData, ChartDataset, ChartDatasetProperties } from 'chart.js';
import dayjs from 'dayjs';
import { colors } from 'lib/getRandomColor';
+import { keys } from 'lodash-es';
import { TraceReducer } from 'types/reducer/trace';
function transposeArray(array: number[][], arrayLength: number) {
@@ -67,8 +68,8 @@ export const getChartDataforGroupBy = (
const allGroupBy = Object.keys(items).map((e) => items[e].groupBy);
- Object.keys(allGroupBy).map((e) => {
- const { length } = Object.keys(allGroupBy[e]);
+ keys(allGroupBy).forEach((e: string): void => {
+ const { length } = keys(allGroupBy[e]);
if (length >= max) {
max = length;
diff --git a/frontend/src/container/Trace/Graph/index.tsx b/frontend/src/container/Trace/Graph/index.tsx
index a41332c125..01630d4711 100644
--- a/frontend/src/container/Trace/Graph/index.tsx
+++ b/frontend/src/container/Trace/Graph/index.tsx
@@ -24,7 +24,7 @@ function TraceGraph(): JSX.Element {
return selectedGroupBy.length === 0
? getChartData(payload)
: getChartDataforGroupBy(payload);
- }, [payload, selectedGroupBy.length]);
+ }, [payload, selectedGroupBy]);
if (error) {
return (
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 02a4da1843..2896ef19ef 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -5144,7 +5144,7 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.6, debug@^3.2.7:
dependencies:
ms "^2.1.1"
-"debug@github:ngokevin/debug#noTimestamp":
+debug@ngokevin/debug#noTimestamp:
version "2.2.0"
resolved "https://codeload.github.com/ngokevin/debug/tar.gz/ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a"
@@ -5352,7 +5352,7 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
-"document-register-element@github:dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90":
+document-register-element@dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90:
version "0.5.4"
resolved "https://codeload.github.com/dmarcos/document-register-element/tar.gz/8ccc532b7f3744be954574caf3072a5fd260ca90"
@@ -11821,7 +11821,7 @@ threads@^1.7.0:
optionalDependencies:
tiny-worker ">= 2"
-"three-bmfont-text@github:dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733":
+three-bmfont-text@dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733:
version "2.4.0"
resolved "https://codeload.github.com/dmarcos/three-bmfont-text/tar.gz/21d017046216e318362c48abd1a48bddfb6e0733"
dependencies: