diff --git a/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx b/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx index a3fe0d7e72..4b367e516e 100644 --- a/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx +++ b/packages/jaeger-ui/src/utils/span-ancestor-ids.tsx @@ -22,7 +22,11 @@ function getFirstAncestor(span: Span): Span | TNil { return _get( _find( span.references, - ({ span: ref, refType }) => ref && ref.spanID && (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') + ({ span: ref, refType }) => + ref && + ref.spanID && + ref.spanID !== span.spanID && + (refType === 'CHILD_OF' || refType === 'FOLLOWS_FROM') ), 'span' );