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

Search query TraceQL is truncated to 1024 characters #3747

Closed
Handy-caT opened this issue Jun 4, 2024 · 2 comments
Closed

Search query TraceQL is truncated to 1024 characters #3747

Handy-caT opened this issue Jun 4, 2024 · 2 comments
Labels
stale Used for stale issues / PRs traceql type/bug Something isn't working

Comments

@Handy-caT
Copy link

Handy-caT commented Jun 4, 2024

For a query longer than 1024 characters, Tempo will return an error:

Error (invalid TraceQL query: parse error at line 1, col 1025: syntax error: unexpected $end). Please check the server logs for more details.

It alsways returns 1025, not real query length (for my example length is 1073).

To Reproduce
Steps to reproduce the behavior:

  1. Start Tempo
  2. Send a request with query longer than 1024 characters
  3. The error is returned

Expected behavior
Any query works.

Environment:

Infrastructure: docker

Additional Context

Снимок экрана 2024-06-04 в 12 48 47

2024-06-04 12:34:08 level=error ts=2024-06-04T09:34:08.392342793Z caller=search_handlers.go:84 msg="search: parse search request failed" err="invalid TraceQL query: parse error at line 1, col 1025: syntax error: unexpected $end"
2024-06-04 12:34:08 level=info ts=2024-06-04T09:34:08.392377084Z caller=handler.go:133 tenant=single-tenant method=GET traceID=3e4195d536fe281f url="/api/search?q=<query>&limit=20000&spss=3&start=1717488489&end=1717492089" duration=144.542µs response_size=0 status=400

This issue is similar to #3513, but related to whole query lenght, not character attribute names or static values.

@joe-elliott
Copy link
Member

That's interesting. The linked PR adds a test that includes queries > 1024:

https://github.com/grafana/tempo/pull/3571/files#diff-d8f0eeb0f51fa96478a53e37dcfc511f62d7b6b34960229c984308f6bf541df6R1171

Likely we're overrunning the same lex buffer in a different way?

@joe-elliott joe-elliott added type/bug Something isn't working traceql labels Jun 4, 2024
Copy link
Contributor

github-actions bot commented Aug 4, 2024

This issue has been automatically marked as stale because it has not had any activity in the past 60 days.
The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity.
Please apply keepalive label to exempt this Issue.

@github-actions github-actions bot added the stale Used for stale issues / PRs label Aug 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used for stale issues / PRs traceql type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants