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

Return unfiltered results when a bad TraceQL query is provided #3426

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

mapno
Copy link
Member

@mapno mapno commented Feb 26, 2024

What this PR does:

Return unfiltered results when a bad TraceQL query is provided in autocomplete. Before it would error with a 500 without providing any useful feedback to the user.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

// If the query has bad TraceQL, don't error out, return unfiltered results
var parseErr *ParseError
if errors.As(err, &parseErr) {
rootExpr, _ = Parse("{ true }")
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this performance compare versus falling back to the non-traceql value lookup?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a last check in the fetcher itself https://github.com/grafana/tempo/blob/main/tempodb/encoding/vparquet3/block_autocomplete.go#L28-L31. It'll go through the non-traceql lookup.

Copy link
Contributor

@ie-pham ie-pham left a comment

Choose a reason for hiding this comment

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

LGTM

@mapno mapno merged commit 014cc3a into grafana:main Feb 28, 2024
14 checks passed
@mapno mapno deleted the autocomplete-bad-query-fix branch February 28, 2024 15:28
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.

3 participants