diff --git a/src/components/Insights/InsightList/index.tsx b/src/components/Insights/InsightList/index.tsx index 4cf84883c..702d3d382 100644 --- a/src/components/Insights/InsightList/index.tsx +++ b/src/components/Insights/InsightList/index.tsx @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; import { DefaultTheme, useTheme } from "styled-components"; +import { actions as globalActions } from "../../../actions"; import { usePersistence } from "../../../hooks/usePersistence"; import { trackingEvents as globalTrackingEvents } from "../../../trackingEvents"; import { isUndefined } from "../../../typeGuards/isUndefined"; @@ -7,6 +8,7 @@ import { InsightType } from "../../../types"; import { getInsightTypeInfo } from "../../../utils/getInsightTypeInfo"; import { getInsightTypeOrderPriority } from "../../../utils/getInsightTypeOrderPriority"; import { sendTrackingEvent } from "../../../utils/sendTrackingEvent"; +import { ChangeScopePayload } from "../../Navigation/types"; import { Card } from "../../common/Card"; import { Tooltip } from "../../common/Tooltip"; import { EndpointIcon } from "../../common/icons/EndpointIcon"; @@ -338,6 +340,17 @@ const renderInsightCard = ( }); }; + const handleGoToSpan = (spanCodeObjectId: string) => { + window.sendMessageToDigma({ + action: globalActions.CHANGE_SCOPE, + payload: { + span: { + spanCodeObjectId + } + } + }); + }; + if (isSpanDurationsInsight(insight)) { return ( ); } @@ -359,6 +373,7 @@ const renderInsightCard = ( onAssetLinkClick={handleAssetLinkClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -371,6 +386,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -384,6 +400,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -397,6 +414,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -407,6 +425,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -421,6 +440,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -433,6 +453,7 @@ const renderInsightCard = ( onExpandButtonClick={handleErrorsExpandButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -447,6 +468,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -461,6 +483,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -476,6 +499,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -502,6 +526,7 @@ const renderInsightCard = ( onAssetLinkClick={handleAssetLinkClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -513,6 +538,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -525,6 +551,7 @@ const renderInsightCard = ( onHistogramButtonClick={handleHistogramButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -537,6 +564,7 @@ const renderInsightCard = ( onHistogramButtonClick={handleHistogramButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -550,6 +578,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -563,6 +592,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -577,6 +607,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -588,6 +619,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={handleRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -603,6 +635,7 @@ const renderInsightCard = ( onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -617,6 +650,7 @@ const renderInsightCard = ( onRecalculate={handleRecalculate} onRefresh={handleRefresh} onJiraTicketCreate={onJiraTicketCreate} + onGoToSpan={handleGoToSpan} /> ); } diff --git a/src/components/Insights/InsightsPage/index.tsx b/src/components/Insights/InsightsPage/index.tsx index 858a793d2..9dbf34754 100644 --- a/src/components/Insights/InsightsPage/index.tsx +++ b/src/components/Insights/InsightsPage/index.tsx @@ -7,6 +7,7 @@ import { isNumber } from "../../../typeGuards/isNumber"; import { isUndefined } from "../../../typeGuards/isUndefined"; import { InsightType } from "../../../types"; import { sendTrackingEvent } from "../../../utils/sendTrackingEvent"; +import { ChangeScopePayload } from "../../Navigation/types"; import { ConfigContext } from "../../common/App/ConfigContext"; import { Card } from "../../common/Card"; import { EmptyState } from "../../common/EmptyState"; @@ -186,6 +187,17 @@ const renderInsightCard = ( }); }; + const handleGoToSpan = (spanCodeObjectId: string) => { + window.sendMessageToDigma({ + action: globalActions.CHANGE_SCOPE, + payload: { + span: { + spanCodeObjectId + } + } + }); + }; + if (isSpanDurationsInsight(insight)) { return ( ); } @@ -208,6 +221,7 @@ const renderInsightCard = ( onAssetLinkClick={handleAssetLinkClick} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -221,6 +235,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -235,6 +250,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -249,6 +265,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -260,6 +277,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -275,6 +293,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -290,6 +309,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -305,6 +325,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -321,6 +342,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -333,6 +355,7 @@ const renderInsightCard = ( onAssetLinkClick={handleAssetLinkClick} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -344,6 +367,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -357,6 +381,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -370,6 +395,7 @@ const renderInsightCard = ( onTraceButtonClick={handleTraceButtonClick} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -384,6 +410,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -395,6 +422,7 @@ const renderInsightCard = ( insight={insight} onRecalculate={handleRecalculate} onRefresh={onRefresh} + onGoToSpan={handleGoToSpan} /> ); } @@ -410,6 +438,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } @@ -425,6 +454,7 @@ const renderInsightCard = ( onRefresh={onRefresh} onJiraTicketCreate={onJiraTicketCreate} isJiraHintEnabled={isJiraHintEnabled} + onGoToSpan={handleGoToSpan} /> ); } diff --git a/src/components/Insights/common/InsightCard/InsightHeader/index.tsx b/src/components/Insights/common/InsightCard/InsightHeader/index.tsx index 0f3b97836..b72dd0ce3 100644 --- a/src/components/Insights/common/InsightCard/InsightHeader/index.tsx +++ b/src/components/Insights/common/InsightCard/InsightHeader/index.tsx @@ -1,10 +1,13 @@ +import { useContext } from "react"; import { InsightTypeInfo, getInsightTypeInfo } from "../../../../../utils/getInsightTypeInfo"; import { roundTo } from "../../../../../utils/roundTo"; +import { ConfigContext } from "../../../../common/App/ConfigContext"; import { InfoCircleIcon } from "../../../../common/icons/InfoCircleIcon"; import { WarningTriangleIcon } from "../../../../common/icons/WarningTriangleIcon"; +import { Link } from "../../../../common/v3/Link"; import { NewTag } from "../../../../common/v3/NewTag"; import { Tag } from "../../../../common/v3/Tag"; import { TagType } from "../../../../common/v3/Tag/types"; @@ -37,47 +40,68 @@ const getTagTitle = ( }; export const InsightHeader = (props: InsightHeaderProps) => { + const config = useContext(ConfigContext); + const insightTypeInfo = getInsightTypeInfo(props.insightType); const tagType = getTagType(props.criticality); const tagTitle = getTagTitle(insightTypeInfo, props.criticality); + const handleSpanLinkClick = () => { + if (props.spanInfo) { + props.onSpanLinkClick(props.spanInfo.spanCodeObjectId); + } + }; + return ( - {insightTypeInfo && ( - - } - /> - - )} - - {insightTypeInfo?.label} - {insightTypeInfo?.description && ( - }> - - - + + {insightTypeInfo && ( + + + } + /> )} - - - {props.criticality > 0.8 && ( - - - - + + {insightTypeInfo?.label} + {insightTypeInfo?.description && ( + }> + + + + + )} + + + {props.criticality > 0.8 && ( + + + + + + )} + {props.isAsync && } + {props.isNew && } + {props.isActive && ( + + + Active + + )} + + + {!config.scope?.span && props.spanInfo && ( + + + + {props.spanInfo.displayName} + - )} - {props.isAsync && } - {props.isNew && } - {props.isActive && ( - - - Active - - )} - + + )} ); }; diff --git a/src/components/Insights/common/InsightCard/InsightHeader/styles.ts b/src/components/Insights/common/InsightCard/InsightHeader/styles.ts index 79067f46a..ee40a238e 100644 --- a/src/components/Insights/common/InsightCard/InsightHeader/styles.ts +++ b/src/components/Insights/common/InsightCard/InsightHeader/styles.ts @@ -5,11 +5,21 @@ import { } from "../../../../common/App/typographies"; export const Container = styled.div` + display: flex; + flex-direction: column; +`; + +export const TitleRow = styled.div` display: flex; align-items: center; gap: 8px; `; +export const SpanInfoRow = styled.div` + display: flex; + padding-left: 32px; +`; + export const TagTitle = styled.span` white-space: pre; `; diff --git a/src/components/Insights/common/InsightCard/InsightHeader/types.ts b/src/components/Insights/common/InsightCard/InsightHeader/types.ts index 64a03d0a5..6afed02bb 100644 --- a/src/components/Insights/common/InsightCard/InsightHeader/types.ts +++ b/src/components/Insights/common/InsightCard/InsightHeader/types.ts @@ -1,3 +1,5 @@ +import { SpanInfo } from "../../../../../types"; + export interface InsightHeaderProps { insightType: string; isActive?: boolean; @@ -6,4 +8,6 @@ export interface InsightHeaderProps { isAsync?: boolean; isNew?: boolean; criticality: number; + spanInfo?: SpanInfo | null; + onSpanLinkClick: (spanCodeObjectId: string) => void; } diff --git a/src/components/Insights/common/InsightCard/index.tsx b/src/components/Insights/common/InsightCard/index.tsx index 0b0b7a6aa..bd8932fc8 100644 --- a/src/components/Insights/common/InsightCard/index.tsx +++ b/src/components/Insights/common/InsightCard/index.tsx @@ -44,6 +44,12 @@ export const InsightCard = (props: InsightCardProps) => { ); }; + const handleSpanLinkClick = () => { + if (isSpanInsight(props.insight) && props.insight.spanInfo) { + props.onGoToSpan(props.insight.spanInfo.spanCodeObjectId); + } + }; + const renderRecalculationBlock = ( actualStartTime: string, customStartTime: string | null, @@ -180,7 +186,9 @@ export const InsightCard = (props: InsightCardProps) => { {toolbarActions.map((toolbarAction) => ( - +
+ +
))} @@ -198,12 +206,16 @@ export const InsightCard = (props: InsightCardProps) => { } content={ diff --git a/src/components/Insights/common/InsightCard/types.ts b/src/components/Insights/common/InsightCard/types.ts index 39bff6a9d..f9f2f0f25 100644 --- a/src/components/Insights/common/InsightCard/types.ts +++ b/src/components/Insights/common/InsightCard/types.ts @@ -25,4 +25,5 @@ export interface InsightCardProps { spanCodeObjectId?: string; }; onJiraButtonClick?: (spanCodeObjectId: string, event: string) => void; + onGoToSpan: (spanCodeObjectId: string) => void; } diff --git a/src/components/Insights/common/insights/DurationBreakdownInsight/index.tsx b/src/components/Insights/common/insights/DurationBreakdownInsight/index.tsx index fc8a15f25..f02fe7cd1 100644 --- a/src/components/Insights/common/insights/DurationBreakdownInsight/index.tsx +++ b/src/components/Insights/common/insights/DurationBreakdownInsight/index.tsx @@ -127,6 +127,7 @@ export const DurationBreakdownInsight = ( } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/DurationInsight/index.tsx b/src/components/Insights/common/insights/DurationInsight/index.tsx index 0c487e09b..464ae4b7b 100644 --- a/src/components/Insights/common/insights/DurationInsight/index.tsx +++ b/src/components/Insights/common/insights/DurationInsight/index.tsx @@ -425,6 +425,7 @@ export const DurationInsight = (props: DurationInsightProps) => { onOpenHistogram={ props.insight.spanInfo ? props.onHistogramButtonClick : undefined } + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx b/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx index c219f02f9..2c24cfafa 100644 --- a/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointBottleneckInsight/index.tsx @@ -74,6 +74,7 @@ export const EndpointBottleneckInsight = ( onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} onJiraButtonClick={handleTicketInfoButtonClick} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx b/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx index ea40525ad..e3d853862 100644 --- a/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointNPlusOneInsight/index.tsx @@ -96,6 +96,7 @@ export const EndpointNPlusOneInsight = ( } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/EndpointQueryOptimizationInsight/index.tsx b/src/components/Insights/common/insights/EndpointQueryOptimizationInsight/index.tsx index ccc537c3b..045e839b4 100644 --- a/src/components/Insights/common/insights/EndpointQueryOptimizationInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointQueryOptimizationInsight/index.tsx @@ -123,6 +123,7 @@ export const EndpointQueryOptimizationInsight = ( spanCodeObjectId: selectedSpan?.spanInfo.spanCodeObjectId, isHintEnabled: props.isJiraHintEnabled }} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/EndpointSlowdownSourceInsight/index.tsx b/src/components/Insights/common/insights/EndpointSlowdownSourceInsight/index.tsx index 18bfb4f07..dd80c600b 100644 --- a/src/components/Insights/common/insights/EndpointSlowdownSourceInsight/index.tsx +++ b/src/components/Insights/common/insights/EndpointSlowdownSourceInsight/index.tsx @@ -70,6 +70,7 @@ export const EndpointSlowdownSourceInsight = ( } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/ExcessiveAPICallsInsight/index.tsx b/src/components/Insights/common/insights/ExcessiveAPICallsInsight/index.tsx index 246dc1834..10345d218 100644 --- a/src/components/Insights/common/insights/ExcessiveAPICallsInsight/index.tsx +++ b/src/components/Insights/common/insights/ExcessiveAPICallsInsight/index.tsx @@ -90,6 +90,7 @@ export const ExcessiveAPICallsInsight = ( } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx b/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx index 104dc4b77..72b42d51d 100644 --- a/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx +++ b/src/components/Insights/common/insights/HighNumberOfQueriesInsight/index.tsx @@ -87,6 +87,7 @@ export const HighNumberOfQueriesInsight = ( ) : undefined } + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/RequestBreakdownInsight/index.tsx b/src/components/Insights/common/insights/RequestBreakdownInsight/index.tsx index 0ecb0922c..26b4d2f00 100644 --- a/src/components/Insights/common/insights/RequestBreakdownInsight/index.tsx +++ b/src/components/Insights/common/insights/RequestBreakdownInsight/index.tsx @@ -235,6 +235,7 @@ export const RequestBreakdownInsight = ( onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} isAsync={props.insight.hasAsyncSpans} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx b/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx index 049bf9531..0d2c2eaeb 100644 --- a/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx +++ b/src/components/Insights/common/insights/ScalingIssueInsight/index.tsx @@ -160,6 +160,7 @@ export const ScalingIssueInsight = (props: ScalingIssueInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SessionInViewInsight/index.tsx b/src/components/Insights/common/insights/SessionInViewInsight/index.tsx index 390511c4c..70b663dee 100644 --- a/src/components/Insights/common/insights/SessionInViewInsight/index.tsx +++ b/src/components/Insights/common/insights/SessionInViewInsight/index.tsx @@ -90,6 +90,7 @@ export const SessionInViewInsight = (props: SessionInViewInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SlowEndpointInsight/index.tsx b/src/components/Insights/common/insights/SlowEndpointInsight/index.tsx index 1d081a981..a9d49bdb7 100644 --- a/src/components/Insights/common/insights/SlowEndpointInsight/index.tsx +++ b/src/components/Insights/common/insights/SlowEndpointInsight/index.tsx @@ -33,6 +33,7 @@ export const SlowEndpointInsight = (props: SlowEndpointInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx b/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx index d01a53f0b..f9bd93a2c 100644 --- a/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanEndpointBottleneckInsight/index.tsx @@ -120,6 +120,7 @@ export const SpanEndpointBottleneckInsight = ( } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx b/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx index 0e35409cd..8aece59cb 100644 --- a/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanNPlusOneInsight/index.tsx @@ -141,6 +141,7 @@ export const SpanNPlusOneInsight = (props: SpanNPlusOneInsightProps) => { isHintEnabled: props.isJiraHintEnabled, spanCodeObjectId: props.insight.spanInfo?.spanCodeObjectId }} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SpanNexusInsight/index.tsx b/src/components/Insights/common/insights/SpanNexusInsight/index.tsx index b11267705..092ce1ef3 100644 --- a/src/components/Insights/common/insights/SpanNexusInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanNexusInsight/index.tsx @@ -49,6 +49,7 @@ export const SpanNexusInsight = (props: SpanNexusInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx b/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx index f44d0bfaa..c3ea11ab2 100644 --- a/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx +++ b/src/components/Insights/common/insights/SpanQueryOptimizationInsight/index.tsx @@ -131,6 +131,7 @@ export const SpanQueryOptimizationInsight = ( ) : undefined } + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/TopUsageInsight/index.tsx b/src/components/Insights/common/insights/TopUsageInsight/index.tsx index cb209fc56..f73a43cc1 100644 --- a/src/components/Insights/common/insights/TopUsageInsight/index.tsx +++ b/src/components/Insights/common/insights/TopUsageInsight/index.tsx @@ -250,6 +250,7 @@ export const TopUsageInsight = (props: TopUsageInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/common/insights/TrafficInsight/index.tsx b/src/components/Insights/common/insights/TrafficInsight/index.tsx index bfc06d6fa..d0341201b 100644 --- a/src/components/Insights/common/insights/TrafficInsight/index.tsx +++ b/src/components/Insights/common/insights/TrafficInsight/index.tsx @@ -62,6 +62,7 @@ export const TrafficInsight = (props: TrafficInsightProps) => { } onRecalculate={props.onRecalculate} onRefresh={props.onRefresh} + onGoToSpan={props.onGoToSpan} /> ); }; diff --git a/src/components/Insights/types.ts b/src/components/Insights/types.ts index a923c7944..211e8432f 100644 --- a/src/components/Insights/types.ts +++ b/src/components/Insights/types.ts @@ -101,6 +101,7 @@ export interface InsightProps { spanCodeObjectId: string | undefined, event?: string ) => void; + onGoToSpan: (spanCodeObjectId: string) => void; isJiraHintEnabled?: boolean; }