From 413b0d9faef9a7e2e7bda140cfb305708c8151d5 Mon Sep 17 00:00:00 2001 From: sawhil Date: Sat, 26 Apr 2025 08:45:24 +0530 Subject: [PATCH] fix: fixed the traces corelation query for status code bar charts --- .../src/container/ApiMonitoring/utils.tsx | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/frontend/src/container/ApiMonitoring/utils.tsx b/frontend/src/container/ApiMonitoring/utils.tsx index 5eb1a64886..8dab31a5b6 100644 --- a/frontend/src/container/ApiMonitoring/utils.tsx +++ b/frontend/src/container/ApiMonitoring/utils.tsx @@ -615,14 +615,14 @@ const defaultGroupBy = [ key: 'http.url', type: 'tag', }, - { - key: 'net.peer.port', - dataType: DataTypes.Float64, - type: 'tag', - isColumn: false, - isJSON: false, - id: 'net.peer.port--float64--tag--false', - }, + // { + // key: 'net.peer.port', + // dataType: DataTypes.Float64, + // type: 'tag', + // isColumn: false, + // isJSON: false, + // id: 'net.peer.port--float64--tag--false', + // }, ]; export const getEndPointsQueryPayload = ( @@ -3185,19 +3185,23 @@ export const getStatusCodeBarChartWidgetData = ( op: '=', value: domainName, }, - { - id: '8b1be6f0', - key: { - dataType: DataTypes.String, - id: 'http.url--string--tag--false', - isColumn: false, - isJSON: false, - key: 'http.url', - type: 'tag', - }, - op: '=', - value: endPointName, - }, + ...(endPointName + ? [ + { + id: '8b1be6f0', + key: { + dataType: DataTypes.String, + id: 'http.url--string--tag--false', + isColumn: false, + isJSON: false, + key: 'http.url', + type: 'tag', + }, + op: '=', + value: endPointName, + }, + ] + : []), ...filters.items, ], op: 'AND',