From b6159a7b0cc089ae8fbbdb8b651038cd64932706 Mon Sep 17 00:00:00 2001 From: SagarRajput-7 Date: Wed, 18 Dec 2024 11:21:31 +0530 Subject: [PATCH] fix: added handling for new key - duration_nano in traces --- frontend/src/container/TimeSeriesView/index.tsx | 3 ++- frontend/src/container/Trace/TraceTable/util.ts | 2 +- frontend/src/container/TracesExplorer/ListView/utils.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/container/TimeSeriesView/index.tsx b/frontend/src/container/TimeSeriesView/index.tsx index b619e64b02..c285ab70b6 100644 --- a/frontend/src/container/TimeSeriesView/index.tsx +++ b/frontend/src/container/TimeSeriesView/index.tsx @@ -29,7 +29,8 @@ function TimeSeriesViewContainer({ currentQuery.builder.queryData.forEach( ({ aggregateAttribute, aggregateOperator }) => { const isExistDurationNanoAttribute = - aggregateAttribute.key === 'durationNano'; + aggregateAttribute.key === 'durationNano' || + aggregateAttribute.key === 'duration_nano'; const isCountOperator = aggregateOperator === 'count' || aggregateOperator === 'count_distinct'; diff --git a/frontend/src/container/Trace/TraceTable/util.ts b/frontend/src/container/Trace/TraceTable/util.ts index 08276636c1..4b2e8c7c13 100644 --- a/frontend/src/container/Trace/TraceTable/util.ts +++ b/frontend/src/container/Trace/TraceTable/util.ts @@ -1,5 +1,5 @@ export const getSpanOrderParam = (key: string): string => { - if (key === 'durationNano') { + if (key === 'durationNano' || key === 'duration_nano') { return 'duration'; } if (key === 'timestamp') { diff --git a/frontend/src/container/TracesExplorer/ListView/utils.tsx b/frontend/src/container/TracesExplorer/ListView/utils.tsx index 8dd20669a0..35c9f5aa8f 100644 --- a/frontend/src/container/TracesExplorer/ListView/utils.tsx +++ b/frontend/src/container/TracesExplorer/ListView/utils.tsx @@ -96,7 +96,7 @@ export const getListColumns = ( ); } - if (key === 'durationNano') { + if (key === 'durationNano' || key === 'duration_nano') { return ( {getMs(value)}ms