ymtdzzz / otel-tui

A terminal OpenTelemetry viewer inspired by otel-desktop-viewer
Apache License 2.0
160 stars 2 forks source link

Trace topology view #128

Open codefromthecrypt opened 1 month ago

codefromthecrypt commented 1 month ago

would be nice to be able to aggregate service dependency links and show them

This might use code similar to https://github.com/jaegertracing/jaeger/blob/eaacbf0a40da0c3d55bfeed8d6894f14dca1d4fc/plugin/storage/memory/memory.go#L96

I once wrote one in zipkin, which has more edge cases covered maybe due to duplicate client spans and endpoint change heuristics https://github.com/openzipkin/zipkin/blob/master/zipkin/src/main/java/zipkin2/internal/DependencyLinker.java

Whatever way, I guess the first version doesn't need to be too fancy

ymtdzzz commented 1 month ago

Yeah, that's one of the features I want, such like Jaeger's dependency graph:

image cf. https://signoz.io/blog/jaeger-vs-signoz/

Whatever way, I guess the first version doesn't need to be too fancy

Right, creating a data model and printing a simple graph (or just text?) from it would be the start.

I'll have a look at it!

codefromthecrypt commented 1 month ago

I know the layout will likely use features like you already have in span or detail, but I thought a little about hugo rendering https://gohugo.io/content-management/diagrams/

Also, we probably need to have a zoom. e.g. if only a few services are involved, they will fit on the current columns of the terminal. Otherwise, maybe need to zoom out or allow scrolling with center anchored on last trace viewed (of any). Probably there are other ideas.

cc @tacigar not sure you've seen this it has interesting challenges being a terminal UI!