From 77722b40a470b194a79bdb0b8a5c211412727250 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Thu, 4 Jan 2024 07:59:52 +0100 Subject: [PATCH] Add support of the new insights - Session in View - Excessive API Calls - High number of queries Remove indicator for spans without important insights --- .../TraceTimelineViewer/SpanBarRow.tsx | 2 +- .../components/common/InsightIcon/types.ts | 6 +++-- .../components/common/InsightIcon/utils.ts | 25 +++++++++++++------ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx index aabf6382b5..5c22411313 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanBarRow.tsx @@ -214,7 +214,7 @@ export default class SpanBarRow extends React.PureComponent {rpc ? rpc.operationName : operationName} - {this.state.insights.length > 0 && ( + {mostImportantInsight && mostImportantInsight.importance < 3 && ( diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts index 36a9aa49a0..321fe751e1 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts @@ -22,9 +22,11 @@ export enum InsightType { SpanNPlusOne = 'SpaNPlusOne', SpanEndpointBottleneck = 'SpanEndpointBottleneck', SpanDurations = 'SpanDurations', - SpanScaling = 'SpanScaling', - SpanScalingRootCause = 'SpanScalingRootCause', + SpanScalingBadly = 'SpanScaling', SpanDurationBreakdown = 'SpanDurationBreakdown', EndpointDurationSlowdown = 'EndpointDurationSlowdown', EndpointBreakdown = 'EndpointBreakdown', + EndpointSessionInView = 'EndpointSessionInView', + EndpointChattyApi = 'EndpointChattyApi', + EndpointHighNumberOfQueries = 'EndpointHighNumberOfQueries', } diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts index 73905b669a..611725004a 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts @@ -56,7 +56,7 @@ export const getInsightTypeInfo = ( }, [InsightType.SlowestSpans]: { icon: BottleneckIcon, - label: 'Span Bottleneck', + label: 'Bottleneck', }, [InsightType.EndpointSpanNPlusOne]: { icon: SQLDatabaseIcon, @@ -70,14 +70,10 @@ export const getInsightTypeInfo = ( icon: BottleneckIcon, label: 'Bottleneck', }, - [InsightType.SpanScaling]: { + [InsightType.SpanScalingBadly]: { icon: ScalesIcon, label: 'Scaling Issue Found', }, - [InsightType.SpanScalingRootCause]: { - icon: ScalesIcon, - label: 'Scaling Issue Root Cause Found', - }, [InsightType.SpanUsages]: { icon: SineIcon, label: 'Top Usage', @@ -98,6 +94,18 @@ export const getInsightTypeInfo = ( icon: PieChartIcon, label: 'Request Breakdown', }, + [InsightType.EndpointSessionInView]: { + icon: SQLDatabaseIcon, + label: 'Session in View Query Detected', + }, + [InsightType.EndpointChattyApi]: { + icon: SQLDatabaseIcon, + label: 'Excessive API Calls Detected', + }, + [InsightType.EndpointHighNumberOfQueries]: { + icon: SQLDatabaseIcon, + label: 'High number of queries', + }, }; return insightInfoMap[type]; @@ -128,13 +136,16 @@ export const getInsightTypeOrderPriority = (type: string): number => { [InsightType.SpanDurations]: 60, [InsightType.SpanUsages]: 61, - [InsightType.SpanScaling]: 63, + [InsightType.SpanScalingBadly]: 63, [InsightType.SpanNPlusOne]: 65, [InsightType.SpanDurationChange]: 66, [InsightType.SpanEndpointBottleneck]: 67, [InsightType.SpanDurationBreakdown]: 68, [InsightType.EndpointSpanNPlusOne]: 55, + [InsightType.EndpointSessionInView]: 56, + [InsightType.EndpointChattyApi]: 57, + [InsightType.EndpointHighNumberOfQueries]: 58, [InsightType.SlowestSpans]: 40, [InsightType.LowUsage]: 30, [InsightType.NormalUsage]: 50,