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

Tempo: Option to not show variable options in "search" editor #87126

Merged

Conversation

domasx2
Copy link
Contributor

@domasx2 domasx2 commented Apr 30, 2024

What is this feature?

Adds option addVariablesToOptions (default true) to Tempo query editor to now show variable options.

Why do we need this feature?

Variable options make sense in dashboard context, but not for some app plugins like Application Observability, which use variables for internal reasons that are not meant to be exposed to user.

image

Who is this feature for?

App plugins that use Tempo query editor variables but do not want to expose the variables to users.

Notes

I considered making the change to limit variable options to only when app=dashboard. But not a fan of the app concept or making decision for all plugins. I think it's best to let user of the component make the decision

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.

@domasx2 domasx2 added area/frontend datasource/Tempo no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes internal for issues made by grafanistas labels Apr 30, 2024
@domasx2 domasx2 requested a review from a team as a code owner April 30, 2024 12:23
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.1.x milestone Apr 30, 2024
Copy link
Contributor

@joey-grafana joey-grafana left a comment

Choose a reason for hiding this comment

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

Can you also check for addVariablesToOptions in GroupByField.tsx? It's the last place we use withTemplateVariableOptions.

I realize you don't use that in App O11y but it would be nice to add this for consistency.

Screenshot 2024-05-01 at 10 19 43

@domasx2
Copy link
Contributor Author

domasx2 commented May 3, 2024

Can you also check for addVariablesToOptions in GroupByField.tsx? It's the last place we use withTemplateVariableOptions.
I realize you don't use that in App O11y but it would be nice to add this for consistency.

@joey-grafana done!

@domasx2 domasx2 requested a review from joey-grafana May 3, 2024 08:51
Copy link
Contributor

@joey-grafana joey-grafana left a comment

Choose a reason for hiding this comment

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

Thanks pal. Last thing, you will need to move up the the addVariablesToOptions = true default because it's not getting set for GroupBy as it's set to true in SearchField which is a sibling in TraceQLSearch :D

You can merge after that.

@domasx2
Copy link
Contributor Author

domasx2 commented May 3, 2024

Thanks pal. Last thing, you will need to move up the the addVariablesToOptions = true default because it's not getting set for GroupBy as it's set to true in SearchField which is a sibling in TraceQLSearch :D

Glad I asked for re-review, thanks :D

Moved up defaulting to true to TraceQLSearch.tsx

@domasx2 domasx2 merged commit 4b496a9 into main May 3, 2024
14 checks passed
@domasx2 domasx2 deleted the domas-traces-search-editor-allow-disabling-variable-options branch May 3, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend datasource/Tempo internal for issues made by grafanistas no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants