diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts index eed1d8514b..392d34f45f 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts @@ -8,28 +8,26 @@ export interface IInsightIconProps { export enum InsightType { TopErrorFlows = 'TopErrorFlows', - SpanDurationChange = 'SpanDurationChange', - SpanUsageStatus = 'SpanUsageStatus', HotSpot = 'HotSpot', Errors = 'Errors', SlowEndpoint = 'SlowEndpoint', LowUsage = 'LowUsage', NormalUsage = 'NormalUsage', HighUsage = 'HighUsage', - SlowestSpans = 'SlowestSpans', - EndpointSpanNPlusOne = 'EndpointSpaNPlusOne', + EndpointBottleneck = 'EndpointBottleneck', + EndpointSpanNPlusOne = 'EndpointSpanNPlusOne', SpanUsages = 'SpanUsages', SpanNPlusOne = 'SpaNPlusOne', SpanEndpointBottleneck = 'SpanEndpointBottleneck', SpanDurations = 'SpanDurations', SpanScalingBadly = 'SpanScaling', SpanDurationBreakdown = 'SpanDurationBreakdown', - EndpointDurationSlowdown = 'EndpointDurationSlowdown', EndpointBreakdown = 'EndpointBreakdown', EndpointSessionInView = 'EndpointSessionInView', EndpointChattyApi = 'EndpointChattyApi', EndpointHighNumberOfQueries = 'EndpointHighNumberOfQueries', - SpanNexus = "SpanNexus", - SpanQueryOptimization = "SpanQueryOptimization", - EndpointQueryOptimization = "EndpointQueryOptimization" + SpanNexus = 'SpanNexus', + SpanQueryOptimization = 'SpanQueryOptimization', + EndpointQueryOptimization = 'EndpointQueryOptimization', + EndpointSlowdownSource = 'EndpointSlowdownSource', } diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts index 4b14023f8d..338e76bd6f 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts @@ -54,7 +54,7 @@ export const getInsightTypeInfo = ( icon: MeterHighIcon, label: 'Endpoint High Traffic', }, - [InsightType.SlowestSpans]: { + [InsightType.EndpointBottleneck]: { icon: BottleneckIcon, label: 'Bottleneck', }, @@ -86,7 +86,7 @@ export const getInsightTypeInfo = ( icon: ClockWithTicksIcon, label: 'Duration Breakdown', }, - [InsightType.EndpointDurationSlowdown]: { + [InsightType.EndpointSlowdownSource]: { icon: SnailIcon, label: 'Duration Slowdown Source Detected', }, @@ -107,17 +107,17 @@ export const getInsightTypeInfo = ( label: 'High number of queries', }, [InsightType.SpanNexus]: { - icon: BottleneckIcon, // todo changes - label: "Code Nexus Point" + icon: BottleneckIcon, + label: 'Code Nexus Point', }, [InsightType.SpanQueryOptimization]: { icon: SQLDatabaseIcon, - label: "Query Optimization Suggested" + label: 'Query Optimization Suggested', }, [InsightType.EndpointQueryOptimization]: { icon: SQLDatabaseIcon, - label: "Query Optimization Suggested" - } + label: 'Query Optimization Suggested', + }, }; return insightInfoMap[type]; @@ -146,28 +146,29 @@ export const getInsightTypeOrderPriority = (type: string): number => { [InsightType.Errors]: 2, [InsightType.TopErrorFlows]: 3, + // Endpoint insights + [InsightType.EndpointBreakdown]: 5, + [InsightType.HighUsage]: 10, + [InsightType.SlowEndpoint]: 20, + [InsightType.EndpointSlowdownSource]: 25, + [InsightType.LowUsage]: 30, + [InsightType.EndpointBottleneck]: 40, + [InsightType.NormalUsage]: 50, + [InsightType.EndpointSpanNPlusOne]: 55, + [InsightType.EndpointSessionInView]: 56, + [InsightType.EndpointChattyApi]: 57, + [InsightType.EndpointHighNumberOfQueries]: 58, + [InsightType.EndpointQueryOptimization]: 59, + + // Span insights [InsightType.SpanDurations]: 60, [InsightType.SpanUsages]: 61, [InsightType.SpanScalingBadly]: 63, [InsightType.SpanNPlusOne]: 65, - [InsightType.SpanDurationChange]: 66, [InsightType.SpanEndpointBottleneck]: 67, [InsightType.SpanDurationBreakdown]: 68, [InsightType.SpanNexus]: 69, [InsightType.SpanQueryOptimization]: 70, - - [InsightType.EndpointSpanNPlusOne]: 55, - [InsightType.EndpointSessionInView]: 56, - [InsightType.EndpointChattyApi]: 57, - [InsightType.EndpointHighNumberOfQueries]: 58, - [InsightType.EndpointQueryOptimization]: 59, - [InsightType.SlowestSpans]: 40, - [InsightType.LowUsage]: 30, - [InsightType.NormalUsage]: 50, - [InsightType.HighUsage]: 10, - [InsightType.SlowEndpoint]: 20, - [InsightType.EndpointDurationSlowdown]: 25, - [InsightType.EndpointBreakdown]: 5, }; return insightOrderPriorityMap[type] || Infinity;