Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/query: Group by arbitrary labels #5007

Merged
merged 12 commits into from
Oct 14, 2024

Conversation

metalmatze
Copy link
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.

Copy link

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
@@ -171,6 +171,8 @@ func MustReadAllGzip(t require.TestingT, filename string) []byte {
}

func TestConsistency(t *testing.T) {
t.Skipf("skipped, need to think how we want to bring back consistency exports without pprof_labels")
Copy link
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.

@metalmatze metalmatze merged commit 4374652 into main Oct 14, 2024
38 checks passed
@metalmatze metalmatze deleted the flamegraph-groupby-abitrary-labels branch October 14, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants