Show HN: Goroutine-analyzer: A visual goroutine stack dump debugging tool
github.com
github.com
I wish the go runtime would allow adding annotations to stack frames. just something simple to attach key/value pairs to a frame, or something. Enough to give the goroutine a name.
runtime/trace gets close to it by annotating the context with a task/region, but if the trace hadn't been started before the task starts, then it's not going to show up anywhere.
It can:
* Load multiple stackdumps
* Group similar goroutines automatically or manually
* Group goroutines by regular expression
It is written in Java, because I needed a tool and I've done Java UIs in the past. Since I do Go backend development I figured I'd spend my time getting the tool written.We also use a Go agent library (https://github.com/openziti/agent) which helps us gather stack dumps (and pprof dumps, etc) at runtime.
My coworker Andrew did start a similar tool, which is here: https://github.com/andrewpmartinez/grid and uses https://github.com/AllenDang/giu for the UI.
Next time I need a feature I probably take a look at that and see what the model looks like and and how straightforward it is to work with.
grmon covers some of the functionality and is not Java based.
For CLI goroutine analysis there's another tool: https://github.com/linuxerwang/goroutine-inspect which is pretty good.
I think if I do a rewrite it might make more sense to go the web route, like the go tool pprof UIs.
I never thought I would live to see the day these words were unironically authored.