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

[BUGFIX] tempo query: disable syntax highlighting if query is a trace id #2242

Conversation

andreasgerstmayr
Copy link
Contributor

Description

In the explore view, the input field accept either a TraceQL query or a Trace ID, and displays the trace table or the Gantt chart based on the value. Unfortunately, the lezer grammar (correctly) marks Trace IDs as invalid TraceQL queries. Therefore, let's disable syntax highlighting if the input is a Trace ID.

Screenshots

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.
  • Visual tests are stable and unlikely to be flaky.
    See Storybook
    and e2e docs for more details. Common issues
    include:
    • Is the data inconsistent? You need to mock API requests.
    • Does the time change? You need to use consistent time values or mock time utilities.
    • Does it have loading states? You need to wait for loading to complete.

In the explore view, the input field accept either a TraceQL query or a Trace ID,
and displays the trace table or the Gantt chart based on the value.
Unfortunately, the lezer grammar (correctly) marks Trace IDs as invalid TraceQL queries.
Therefore, let's disable syntax highlighting if the input is a Trace ID.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
@andreasgerstmayr andreasgerstmayr added this pull request to the merge queue Sep 13, 2024
Merged via the queue into perses:main with commit 2986746 Sep 13, 2024
18 checks passed
@andreasgerstmayr andreasgerstmayr deleted the disable-syntax-highlighting-for-traceid-query branch September 13, 2024 11:49
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