elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

Flame graphs #16423

Closed tbragin closed 7 months ago

tbragin commented 6 years ago

Flame graphs can be useful for visualizing output of a profiling tool: http://www.brendangregg.com/flamegraphs.html https://github.com/brendangregg/FlameGraph

screen shot 2018-01-30 at 4 42 17 pm

I remember chatting with @danielmitterdorfer about this a while back. Would be interesting to think through how profiling data can be stored in Elasticsearch and visualized in a native Kibana visualization like this.

cc: @alexfrancoeur @thomasneirynck

axw commented 6 years ago

I've been wanting profiling storage since forever. Now that I'm at Elastic, I thought I'd actually do something about it. I've started on a new Beat which gathers pprof profiles: https://github.com/axw/pprofbeat.

(This is my first real foray into ES and Beats, so the data format is probably not great - but it's something.)

I care mostly about profiling Go programs, which is pretty straightforward: import a standard package, and you can expose CPU and heap profile data via an HTTP endpoint. What I want to see is:

I was intending to look at embedding the "pprof" web UI as a plugin, although I don't really know where to start. Needless to say, the more integrated the better.

A few screenshots of the pprof web UI below in case folks are not aware of it - might serve as inspiration.

Example pprof graph: image

Pprof flamegraph: image

Pprof top offenders: image

Pprof source code annotation: image

pmoust commented 6 years ago

A very interesting visualisation approach from the Netflix Perf team, Flamescope

image

This tool makes it easy to distinguish patterns and pop into flamegraph view in subsecond granularity.

X axis is time (t) in seconds, Y axis is the millisecond split of t. The vector that produces the heatmap color density is the event count for that X->Y time.

formgeist commented 4 years ago

I've taken the liberty of creating a new visualization type request in Elastic Charts https://github.com/elastic/elastic-charts/issues/519 to open the conversation with that team and in order to make a qualified assessment on pursuing an MVP implementation for APM and what that should entail.

formgeist commented 3 years ago

Elastic Charts have just released an alpha version of the flame chart https://github.com/elastic/elastic-charts/pull/965

monfera commented 3 years ago

elastic-charts merged focus (in-chart drilldown) with tweening

https://user-images.githubusercontent.com/1548516/109667342-5787c000-7b70-11eb-9dc6-a5a9354bd184.mp4

timductive commented 7 months ago

Closing as we now have a flame graph in the o11y profiler application