diff --git a/src/components/Insights/common/InsightCard/InsightHeader/InsightStatusBadge/getInsightStatusInfo.ts b/src/components/Insights/common/InsightCard/InsightHeader/InsightStatusBadge/getInsightStatusInfo.ts index ad305c3ea..d5fbfa044 100644 --- a/src/components/Insights/common/InsightCard/InsightHeader/InsightStatusBadge/getInsightStatusInfo.ts +++ b/src/components/Insights/common/InsightCard/InsightHeader/InsightStatusBadge/getInsightStatusInfo.ts @@ -29,7 +29,7 @@ export const getInsightStatusInfo = ( case InsightStatus.Regression: return { label: "Regression", - color: theme.colors.v3.status.backgroundLow + color: theme.colors.v3.status.high }; } }; diff --git a/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx b/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx index a4be2f69d..a95e1451d 100644 --- a/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx @@ -43,7 +43,6 @@ export const EndpointBottleneckInsight = ( insight={insight} jiraTicketInfo={{ isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId, ticketLink }} content={ diff --git a/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx b/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx index 73cbdf3f4..a704d92a1 100644 --- a/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx @@ -58,8 +58,7 @@ export const EndpointNPlusOneInsight = ( } jiraTicketInfo={{ ticketLink: span.ticketLink, - isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: spanInfo.spanCodeObjectId + isHintEnabled: props.isJiraHintEnabled }} content={ diff --git a/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx b/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx index b56cb2009..914dc03b0 100644 --- a/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx +++ b/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx @@ -28,7 +28,7 @@ export const HighNumberOfQueriesInsight = ( event: string ) => { props.onJiraTicketCreate && - props.onJiraTicketCreate(insight, undefined, event); + props.onJiraTicketCreate(insight, spanCodeObjectId, event); }; return ( @@ -69,8 +69,7 @@ export const HighNumberOfQueriesInsight = ( onJiraButtonClick={handleCreateJiraTicketButtonClick} jiraTicketInfo={{ ticketLink: insight.ticketLink, - isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId + isHintEnabled: props.isJiraHintEnabled }} onGoToTrace={ traceId diff --git a/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx b/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx index 87a489bfc..c53ae0663 100644 --- a/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx +++ b/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx @@ -143,8 +143,7 @@ export const ScalingIssueInsight = (props: ScalingIssueInsightProps) => { } jiraTicketInfo={{ ticketLink: props.insight.ticketLink, - isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId + isHintEnabled: props.isJiraHintEnabled }} onJiraButtonClick={ props.insight.rootCauseSpans.length == 0 diff --git a/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx b/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx index c1a2c057f..694b8de68 100644 --- a/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx @@ -59,7 +59,7 @@ export const SpanEndpointBottleneckInsight = ( event: string ) => { props.onJiraTicketCreate && - props.onJiraTicketCreate(props.insight, undefined, event); + props.onJiraTicketCreate(props.insight, spanCodeObjectId, event); }; const handleTraceButtonClick = ( @@ -75,7 +75,6 @@ export const SpanEndpointBottleneckInsight = ( insight={props.insight} onJiraButtonClick={handleCreateJiraTicketButtonClick} jiraTicketInfo={{ - spanCodeObjectId: selectedEndpoint?.endpointInfo.spanCodeObjectId, ticketLink: props.insight.ticketLink, isHintEnabled: props.isJiraHintEnabled }} diff --git a/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx b/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx index eae658f0f..d5d5c23ac 100644 --- a/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx @@ -64,7 +64,7 @@ export const SpanNPlusOneInsight = (props: SpanNPlusOneInsightProps) => { event: string ) => { props.onJiraTicketCreate && - props.onJiraTicketCreate(props.insight, undefined, event); + props.onJiraTicketCreate(props.insight, spanCodeObjectId, event); }; return ( @@ -135,8 +135,7 @@ export const SpanNPlusOneInsight = (props: SpanNPlusOneInsightProps) => { onJiraButtonClick={handleCreateJiraTicketButtonClick} jiraTicketInfo={{ ticketLink: props.insight.ticketLink, - isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId + isHintEnabled: props.isJiraHintEnabled }} onGoToSpan={props.onGoToSpan} /> diff --git a/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx b/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx index 6297b03c5..4fa57d9d2 100644 --- a/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx @@ -44,11 +44,7 @@ export const SpanQueryOptimizationInsight = ( event: string ) => { props.onJiraTicketCreate && - props.onJiraTicketCreate( - props.insight, - props.insight.spanInfo?.spanCodeObjectId, - event - ); + props.onJiraTicketCreate(props.insight, spanCodeObjectId, event); }; const spanName = props.insight.spanInfo?.displayName || undefined; @@ -114,8 +110,7 @@ export const SpanQueryOptimizationInsight = ( onJiraButtonClick={handleCreateJiraTicketButtonClick} jiraTicketInfo={{ ticketLink: props.insight.ticketLink, - isHintEnabled: props.isJiraHintEnabled, - spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId + isHintEnabled: props.isJiraHintEnabled }} onGoToTrace={ config.isJaegerEnabled && traceId diff --git a/src/components/Insights/common/insights/TopUsageInsight/styles.ts b/src/components/Insights/common/insights/TopUsageInsight/styles.ts index 4daf5e5bc..9cfa3b3f1 100644 --- a/src/components/Insights/common/insights/TopUsageInsight/styles.ts +++ b/src/components/Insights/common/insights/TopUsageInsight/styles.ts @@ -24,11 +24,10 @@ export const FlowData = styled.div` export const SubsequentSpan = styled.div` display: flex; gap: 8px; + align-items: center; `; export const ArrowIconContainer = styled.div` - width: 24px; - height: 24px; display: flex; align-items: center; justify-content: center; @@ -38,6 +37,7 @@ export const FullSpanName = styled.span` display: flex; flex-wrap: wrap; gap: 2px; + overflow: hidden; `; export const SpanNamePart = styled.span` diff --git a/src/components/Insights/index.tsx b/src/components/Insights/index.tsx index 446bbf409..67d0372f9 100644 --- a/src/components/Insights/index.tsx +++ b/src/components/Insights/index.tsx @@ -82,7 +82,7 @@ const renderInsightTicket = ( return ; } - if (isEndpointSpanNPlusOneInsight(data.insight) && data.spanCodeObjectId) { + if (isEndpointSpanNPlusOneInsight(data.insight)) { const ticketData = data as InsightTicketInfo; return ( @@ -94,12 +94,12 @@ const renderInsightTicket = ( return ; } - if (isEndpointBottleneckInsight(data.insight) && data.spanCodeObjectId) { + if (isEndpointBottleneckInsight(data.insight)) { const ticketData = data as InsightTicketInfo; return ; } - if (isSpanQueryOptimizationInsight(data.insight) && data.spanCodeObjectId) { + if (isSpanQueryOptimizationInsight(data.insight)) { const ticketData = data as InsightTicketInfo; return ( @@ -120,10 +120,7 @@ const renderInsightTicket = ( ); } - if ( - isEndpointHighNumberOfQueriesInsight(data.insight) && - data.spanCodeObjectId - ) { + if (isEndpointHighNumberOfQueriesInsight(data.insight)) { const ticketData = data as InsightTicketInfo; return ( diff --git a/src/components/Insights/tickets/EndpointHighNumberOfQueriesInsightTicket/index.tsx b/src/components/Insights/tickets/EndpointHighNumberOfQueriesInsightTicket/index.tsx index 864175b08..847ea67d1 100644 --- a/src/components/Insights/tickets/EndpointHighNumberOfQueriesInsightTicket/index.tsx +++ b/src/components/Insights/tickets/EndpointHighNumberOfQueriesInsightTicket/index.tsx @@ -7,15 +7,15 @@ import { CommitInfos } from "../common/CommitInfos"; import { DigmaSignature } from "../common/DigmaSignature"; import { InsightTicketProps } from "../types"; -export const EndpointHighNumberOfQueriesInsightTicket = ( - props: InsightTicketProps -) => { - const spanInsight = props.data.insight; +export const EndpointHighNumberOfQueriesInsightTicket = ({ + data, + onClose +}: InsightTicketProps) => { const { commitInfos, isLoading } = - useCommitInfos(spanInsight); + useCommitInfos(data.insight); const renderDescription = () => { - if (!spanInsight || !spanInsight.spanInfo) { + if (!data.insight || !data.insight.spanInfo) { return null; } @@ -26,21 +26,21 @@ export const EndpointHighNumberOfQueriesInsightTicket = (
Description
, {`The endpoint ${spanInsight.spanInfo.displayName} is triggering an abnormally high number of queries.`}, + >{`The endpoint ${data.insight.spanInfo.displayName} is triggering an abnormally high number of queries.`},
Consider using joins/caching to reduce the overhead of the db roundtrip.
, {`Number of queries (median): ${spanInsight.queriesCount}`}, + >{`Number of queries (median): ${data.insight.queriesCount}`},
{`Typical for ${spanInsight.serviceName}: ${spanInsight.typicalCount}`}
, + >{`Typical for ${data.insight.serviceName}: ${data.insight.typicalCount}`}, , ], @@ -54,8 +54,8 @@ export const EndpointHighNumberOfQueriesInsightTicket = ( const summary = [ "High number of queries detected ", - spanInsight?.spanInfo?.displayName, - spanInsight?.serviceName + data.insight?.spanInfo?.displayName, + data.insight?.serviceName ] .filter(Boolean) .join(" - "); @@ -67,8 +67,8 @@ export const EndpointHighNumberOfQueriesInsightTicket = ( content: renderDescription(), isLoading }} - insight={props.data.insight} - onClose={props.onClose} + insight={data.insight} + onClose={onClose} /> ); };