nagisa / rust_tracy_client

Tracy client libraries for Rust
Apache License 2.0
159 stars 34 forks source link

Try to use `fiber` support to implement proper support for non-hierarchical tracing spans #35

Open nagisa opened 2 years ago

nagisa commented 2 years ago

Tracing spans don't need to be hierarchical, it is entirely possible to have spans looking like this

| -- S1 -- |
   | -- S2 -- |
      | -- S3 -- |

Tracy itself requires however that all spans entered in a single thread share a strong hierarchical relationship and requires that S2 and S3 both terminate before S1.

Tracy recently introduced support for fibers which, to the best of my knowledge, should give enough control to properly represent non-hierarchical spans like these.

nagisa commented 2 years ago

A downside to this is a significant increase in instrumentation overhead when the fibers feature is enabled.