Add flamegraphs for profiles
We now have support for profiles (#565) and will have support for continuous profiling (#567) so we'd better have an aggregate profile view, where a flamegraph is the industry standard. These will ideally have their dedicated tab.
This component may help: getsentry/sentry@master/static/app/components/profiling/flamegraph/flamegraphPreview.tsx
We should also try a sunburst chart: https://github.com/vasturiano/react-sunburst-chart
@tylersayshi shared this library: https://github.com/antfu/nanovis and it looks awesome.
It even supports on-the-fly switching between sunburst, flamegraph, and a tree map!
hey @BYK ,
I think nanovis is a great option.
I did a quick PoC that parses the profile and maps it to a Flamegraph and other visualisations:
https://github.com/user-attachments/assets/95ad4cd0-2fe2-4557-8f6d-4b7f67afb3b5
The data shown here is from a single profile, it's not an aggregated Flamegraph. this is the direction I was thinking of for integrating profile visualisation. the UI is still a rough draft and will be improved in the final version.
cc @betegon
oh, this looks great @Shubhdeep12 ! Do you have this in a branch to try it out and gather some thoughts?
Wow, this looks very nice @Shubhdeep12 - would love to play with it as @betegon suggested. I'd also love to see a sunburst chart there along with option for an inverted flamegraph (you just invert the stack traces before building the graph, which gives you a different view as the spans are merged differently)
Sure here is the branch - feat/profile-tree
you just invert the stack traces before building the graph, which gives you a different view as the spans are merged differently
yeah we can add invert tree checkbox
hey @BYK @betegon did you get a chance to check this?
hHey @Shubhdeep12 ! Burak is OOO this week, i'll try to check this during the week. thanks for pushing ;)
@Shubhdeep12 had a busy week, let's see how this looks like ;)
I gave it a try and I liked it @Shubhdeep12 . It's useful and gets the job done. Maybe we can ship this, so we add this feature and improve it later.
That's great! I'll improve it a little and raise a PR then
thanks for the review.