diff --git a/src/components/Insights/TopUsageInsight/index.tsx b/src/components/Insights/TopUsageInsight/index.tsx index ab8ceecea..487a7e6bf 100644 --- a/src/components/Insights/TopUsageInsight/index.tsx +++ b/src/components/Insights/TopUsageInsight/index.tsx @@ -30,7 +30,7 @@ export const TopUsageInsight = (props: TopUsageInsightProps) => { const handleTraceButtonClick = ( trace: Trace, insightType: InsightType, - spanCodeObjectId: string + spanCodeObjectId?: string ) => { props.onTraceButtonClick(trace, insightType, spanCodeObjectId); }; @@ -94,7 +94,7 @@ export const TopUsageInsight = (props: TopUsageInsightProps) => { id: traceId }, props.insight.type, - flow.firstService.spanCodeObjectId + props.insight.spanInfo?.spanCodeObjectId ) } > diff --git a/src/components/Insights/TopUsageInsight/types.ts b/src/components/Insights/TopUsageInsight/types.ts index 8eff546c8..219947885 100644 --- a/src/components/Insights/TopUsageInsight/types.ts +++ b/src/components/Insights/TopUsageInsight/types.ts @@ -10,6 +10,6 @@ export interface TopUsageInsightProps extends InsightProps { onTraceButtonClick: ( trace: Trace, insightType: InsightType, - spanCodeObjectId: string + spanCodeObjectId?: string ) => void; }