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

Pyroscope: Fix stale value for query in query editor #80753

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

joey-grafana
Copy link
Contributor

@joey-grafana joey-grafana commented Jan 17, 2024

What is this feature?

Fixes issue with stale query value in Pyroscope query editor.

Why do we need this feature?

We need to reference the query as otherwise when it's passed into useLabels, only the initial value of the query is passed into the LabelsEditor (onChange) which renders the CodeEditor for Monaco. The above needs to have a ref to the query so it can get the latest value.

Who is this feature for?

Tempo users/

Which issue(s) does this PR fix?:

Fixes #80502
Fixes #80765

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@joey-grafana joey-grafana added this to the 10.4.x milestone Jan 17, 2024
@joey-grafana joey-grafana self-assigned this Jan 17, 2024
@joey-grafana joey-grafana marked this pull request as ready for review January 17, 2024 17:33
@joey-grafana joey-grafana requested a review from a team as a code owner January 17, 2024 17:33
Copy link
Member

@aocenas aocenas left a comment

Choose a reason for hiding this comment

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

Nice looks great

@joey-grafana joey-grafana merged commit 6d15e16 into main Jan 22, 2024
13 checks passed
@joey-grafana joey-grafana deleted the joey/pyroscope-query-editor-fix branch January 22, 2024 15:02
Ukochka pushed a commit that referenced this pull request Feb 14, 2024
* Fix stale value for query in query editor

* Separate out onLabelSelectorChange into its own hook

* Move queryRef inside hook
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profiling: Explore query resets when typging Pyroscope: Sub-group selection profiling resets on query change
3 participants