-
I'm trying to add a tracing span to some functions with the intent of logging the output to the chrome-tracing JSON format. I've tried a few different paths with no luck. I dove into the source to find an example of a stage being traced: bevy/crates/bevy_ecs/src/schedule/mod.rs Lines 145 to 147 in 841755a I tried to do the same in my code, but I'm not seeing anything in the tracing file when I open it up. My understanding is that assigning a span.enter() to a variable will start the clock, and it will span until it goes out of scope and is dropped. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Welp, it looks like I answered my own question - changing to an Code here for reference: I'll leave this here in case someone else has the same question. |
Beta Was this translation helpful? Give feedback.
Welp, it looks like I answered my own question - changing to an
info_span!()
instead of atracing_span!()
seems to have worked!Code here for reference:
https://github.com/aevyrie/bevy_mod_picking/blob/8b30b5825bac5227ce36bd5f216d43e89e6418dd/src/lib.rs#L391-L392
I'll leave this here in case someone else has the same question.