grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
9.79k stars 583 forks source link

Create tag-explorer page for analyzing tag breakdowns #1282

Closed Rperry2174 closed 2 years ago

Rperry2174 commented 2 years ago

Goal:

The idea of the explore page is to give a slightly “higher” level view of your data than why Pyroscope currently gives you. I created a mockup of what I was thinking about for another page on the sidebar called “tag explorer”

Current problem

For example, right now for our rideshare example, there is one particular region and one particular vehicle that have performance issues, but if we didn’t know that before looking at the example how could we figure out which vehicle and which region are the “problem” areas?

In current Pyroscope you have to click one by one through each region and then one by one through each vehicle and then possible combine region + vehicle in order to figure this out. The comparison page makes this slightly faster 2x but only because you can compare two things at once…

Proposed solution

explore_page_02-01

In this proposed “explore” page i’m proposing that we allow users to select a tag_key and see all the series associated with the corresponding tag values on one graph.

Note: Lets NOT add the “where” dropdown for v1

In this situation, if one region is consuming significantly more cpu, even if there are 30 regions, we would be able to see at first glance that 29 are normal and one series is high.

We could then dig further and look at the “descriptive statistics” for that series compared to the other series.

Finally, we could see the flamegraph associated with that series and if we want we can use the buttons to go to Single view, comparison view, or diff view.

Implementation details

Dmitry added support for “group by” queries here: https://github.com/pyroscope-io/pyroscope/pull/1244

We can do group by, but not “where”. So for the first implementation we should not include the “where” dropdown.

Descriptive statistics:

For V1 we can just stub these. image

For example we will eventually calculate all these column headers on the frontend. But for now we should just use something simple like avg_samples and just use that for all 9 columns.

The more important functionality is to be able to click on one of the tags and have it show up in the flamegraph below.

Long term benefits or proposed solution

Reference

Here's how jaeger does descriptive statistics

image
Rperry2174 commented 2 years ago

closed in #1293 / #1319