-
Notifications
You must be signed in to change notification settings - Fork 2
Description
This is a follow-up from #30.
It could potentially be very useful if events could be grouped by their parent spans, rather than by when they occurred temporally. That way, rather than rendering a linear series of events, we could have a mode where events are rendered as a tree under their parent spans.
This might look similarly to the slog
-inspired example in tracing
:
However, in the example, the events and spans are still grouped temporally, indentation is used here just to indicate which events are children of a given span. This is because the example simply writes lines to standard out. The console, on the other hand, dynamically updates the whole view, so we have the ability to show a tree mode where all children of a span are printed under a single tree entry for that span.
I'm not sure if tui-rs
's list widget can be used for a view like this or not (since it's not clear from the docs whether lists can be hierarchical), but there is also a feature request for a tree view widget: fdehau/tui-rs#60
If we implement our own tree view widget, it could probably be contributed back to the tui
crate eventually.