tokio-rs / tracing

Application level tracing for Rust.
https://tracing.rs
MIT License
5.39k stars 707 forks source link

Documentation bug in `FmtContext::visit_spans` #2940

Open Xaeroxe opened 5 months ago

Xaeroxe commented 5 months ago

Bug Report

Version

tracing-subscriber 0.3.18

Platform

Documentation

Crates

tracing-subscriber

Description

The documentation for FmtContext::visit_spans claims that it will call the closure on the current span, and then upwards to the root span. The actual behavior is the reverse of this. It starts at the root, and then descends to the current span.

Either the implementation or the documentation should be updated. My preference is the documentation should be updated.