Class ParentResolver


  • public class ParentResolver
    extends Object
    Resolves parent spans before a child span starts.
    • Method Detail

      • resolveParent

        public static SpanWrapper resolveParent​(StatisticDataUnit child,
                                                SpanStore spanStore,
                                                MessageContext synCtx)
        Resolves parent spans before a child span starts. The message flow parent index which is explicitly reported by the statistic data unit is checked first. The parent is finalized if it gives an acceptable parent as implemented inside. During an unacceptable parent in the above case, the component's unique id will be examined in the artifact holder's structuring elements stack, in order to track the parent holder. In case if both of the above fail, the most recent active span will be chosen as the parent. The very first span of the scope will always return null as the parent, which creates a new trace.
        Parameters:
        child - Statistic data unit of the child.
        spanStore - Span store from where, existing spans are referred.
        synCtx - Message context.
        Returns:
        Resolved parent span wrapper. Null if no parent.