Skip to content

bug fix: Clicking on a sample should highlight it when there are query filters and sum by values#5054

Merged
yomete merged 2 commits into
mainfrom
highlight-sample-metrics-graph
Sep 2, 2024
Merged

bug fix: Clicking on a sample should highlight it when there are query filters and sum by values#5054
yomete merged 2 commits into
mainfrom
highlight-sample-metrics-graph

Conversation

@yomete

@yomete yomete commented Sep 2, 2024

Copy link
Copy Markdown
Contributor

When profiling data is filtered with both matchers and sumBy value(s), selecting a profile in the metrics graph fails to highlight the point.

Steps to reproduce:

  1. Go to demo.parca.dev/devel
  2. Filter profiles (e.g., container="parca-agent")
  3. Add a sumBy value (e.g., "comm")
  4. Attempt to select a profile in the metrics graph

This is happening because the findSelectedProfile function uses label matchers from the query expression to determine
the selected series. With sumBy, series are limited to the sumBy value, causing the function to fail as it looks for non-existent label sets.

The fix here ensures that we are correctly identifying the selected series based on the profile matchers alone or a combination of the profile matchers and the sumBy value (and prioritizing the sumBy label names and values if present).

@alwaysmeticulous

alwaysmeticulous Bot commented Sep 2, 2024

Copy link
Copy Markdown

🤖 Meticulous spotted visual differences in 4 of 589 screens tested: view and approve differences detected.

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

@brancz brancz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice find!

@yomete
yomete merged commit d386449 into main Sep 2, 2024
@yomete
yomete deleted the highlight-sample-metrics-graph branch September 2, 2024 12:00
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