Given the code, I believe it is partly caused by the write_span_info eagerly printing the exit span if verbose_entry=true regardless of if the SpanMode::Exit will print anything; and conversely and not printing it if verbose_entry=false but the exit span is SpanMode::Exit { verbose: true }.
verbose_exit(false) and verbose_entry(true):
verbose_exit(true) and verbose_entry(false):
Given the code, I believe it is partly caused by the
write_span_info
eagerly printing the exit span ifverbose_entry=true
regardless of if the SpanMode::Exit will print anything; and conversely and not printing it ifverbose_entry=false
but the exit span isSpanMode::Exit { verbose: true }
.My PR: https://github.com/davidbarsky/tracing-tree/pull/64 adds a debugging label which allows you too see which event/SpanMode generated a line, so it would help in this issue as well.
That PR is not far of at all either, as both retracing and lazy spans are working using almost the same code