diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/index.tsx b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/index.tsx index 1ada2527f7..541e401664 100644 --- a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/index.tsx +++ b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/index.tsx @@ -27,7 +27,7 @@ import LabeledList from '../../../common/LabeledList'; import { actions } from '../../../../api/digma/actions'; import { dispatcher } from '../../../../api/digma/dispatcher'; import { state as globalState } from '../../../../api/digma/state'; -import { SetSpansDataPayload } from '../../../../api/digma/types'; +import { ISpanInsight, SetSpansDataPayload } from '../../../../api/digma/types'; import { getInsightTypeInfo } from '../../../common/InsightIcon/utils'; import { InsightIcon } from '../../../common/InsightIcon'; @@ -51,7 +51,6 @@ type SpanDetailProps = { }; type SpanDetailState = { - hasCodeLocation: boolean; insights: ISpanInsight[]; }; @@ -60,7 +59,6 @@ export default class SpanDetail extends React.Component { const span = (data as SetSpansDataPayload)[this.props.span.spanID]; this.setState({ - hasCodeLocation: Boolean(span && span.hasCodeLocation), insights: span ? span.insights : [], }); }; @@ -137,12 +134,13 @@ export default class SpanDetail extends React.Component tag.key === 'otel.library.name'); return (
- {this.state.hasCodeLocation ? ( + {otelLibraryNameTag && this.state.insights.length > 0 ? (