mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-10-02 15:24:47 +00:00

## Motivation Entering twice in the same span causes the span to be lost after the second span got droped, see #358 ## Solution Duplicate spans are tracked in the `CONTEXT` thread local stack and ignored when finding the current span id. Spans are always pushed on the `CONTEXT` stack. This way, when a span is dropped, its ref count reflects the content of the thread local Fixes #358