Description
I'm currently authoring a tracing-forest
, a Subscriber
that performs diagnostics on trace data. We ran into an issue where isahc
generates trace data where the entered duration of a parent span is shorter than the entered duration of its children. I've outlined the problem further in this issue. I think I've narrowed down the culprit to these lines:
Lines 403 to 404 in 79338ab
Here, the parent is passed in to the child and the child is entered, but the parent is not, causing the children to accumulate time while the parent idles. Is there a reason for not entering the parent span, or is this a bug? If it is intended, what is the motivation for it?
I would guess that the fix would look something like this, where the parent span is entered before the child:
let span = tracing::trace_span!(parent: &self.span, "header");
let _enter = self.span.enter(); // parent enters before the child
let _enter = span.enter();
Activity