Skip to content

pkg/query: Group by arbitrary labels#5007

Merged
metalmatze merged 12 commits into
mainfrom
flamegraph-groupby-abitrary-labels
Oct 14, 2024
Merged

pkg/query: Group by arbitrary labels#5007
metalmatze merged 12 commits into
mainfrom
flamegraph-groupby-abitrary-labels

Conversation

@metalmatze
Copy link
Copy Markdown
Member

Previously, Parca allowed to group by all pprof_labels at once that are part of profiles.
With these changes, Parca allows grouping by labels, which now includes the pprof_labels and the infrastructure labels.
This allows grouping by comm or namespace within an icicle graph.
Additionally, grouping by only the trace_id but not any other labels like thread_id will be possible.

A simple example

Filter for runtime.gcBgMarkWorker in all of your infrastructure. Then group the icicle graph by job to see the garbage collection by job.

Before

before

After

after

Notice the new rows in the second screenshot now with job=prometheus and job=parca. Beneath them, we pretty much have the same stack traces that were previously aggregated together.

UI

Selecting the labels to group by looks like this now:

2
1

We need to think about the Select component within the dropdown... Not ideal right now.

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Aug 27, 2024

🤖 Meticulous spotted visual differences in 413 of 526 screens tested: view and approve differences detected.

Last updated for commit 6dd4dc9. This comment will update as new commits are pushed.

metalmatze and others added 11 commits October 14, 2024 18:53
This will then only select label names for the correct profileType and label matchers
We don't write to it and we don't read it anymore. It's all part of the labels now.
Once we're building the FrostDB query we don't care about the rendering flame graphs anymore and therefore we only pass the group by labels into the selectMerge function. Excluding the possible group by features of flame graphs
@metalmatze metalmatze force-pushed the flamegraph-groupby-abitrary-labels branch from f96fbb6 to 6dd4dc9 Compare October 14, 2024 16:53
@metalmatze metalmatze requested a review from a team as a code owner October 14, 2024 16:53
Comment thread pkg/parca/parca_test.go
}

func TestConsistency(t *testing.T) {
t.Skipf("skipped, need to think how we want to bring back consistency exports without pprof_labels")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given we don't store the pprof_labels anymore, it's impossible to export the same profile as pprof download from now on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants