Skip to content

Group events by parent span #31

@hawkw

Description

@hawkw

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:
Screen Shot 2019-07-24 at 1 32 10 PM
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions