Closed bradNASA closed 1 month ago
Discussed with Theresa, and we decided to refactor these two lines of code:
To this:
+(activityParents.containsKey(span)) ? Optional.empty() : Optional.ofNullable(directiveId)
-Optional.ofNullable(directiveId)
The ternary dates back to a time when we used the absence of a parent span to determine whether a span is "top level", and assumed that all top level spans came from the plan. Now, we have a more direct way to compute directive ids, which is robust to the situation where a parent-less span comes from a daemon task rather than a directive in the plan.
Thanks all! Merging this fix.
NPE fix, untested