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

Same queries result in different results #3777

Closed
tg3rh opened this issue Jun 17, 2024 · 7 comments
Closed

Same queries result in different results #3777

tg3rh opened this issue Jun 17, 2024 · 7 comments
Labels
stale Used for stale issues / PRs

Comments

@tg3rh
Copy link

tg3rh commented Jun 17, 2024

Describe the bug
When quickly refreshing (running a search query in the explore view) I am getting a non deterministic view of the traces, resulting in different traces (different timestamps) being shown.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the Explore section in Grafana
  2. Navigate to Query type: Search
  3. Hit Run query a couple of times
  4. Observe different timestamp (+- 5min) are being show in the list

Expected behavior
Expecting to receive the latest traces on the top when refreshing the query.

Environment:

  • Grafana Cloud

Additional Context
Attaching screenshots (queries run after each other)
Screenshot 2024-06-17 at 08 11 41
Screenshot 2024-06-17 at 08 13 40

@joe-elliott
Copy link
Member

Tempo returns the first spans it finds in the supplied time range matching the criteria. We would like to change this to return the most recent spans which would make the results stable.

Some discussion here: #2659 (comment)

Copy link
Contributor

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 17, 2024
@proffalken
Copy link

@joe-elliott - have you been able to make any progress on this?

@joe-elliott joe-elliott removed the stale Used for stale issues / PRs label Aug 22, 2024
@joe-elliott
Copy link
Member

I have. Here is my current branch diffed against main:

main...joe-elliott:ordered-results

I believe I overcame the last of the major perf regressions yesterday. Results will definitely be a bit slower to come in b/c Tempo has to search more data to make sure that it has the most recent results, but I have mitigated it as much as possible.

It's been slow going. I have not had a ton of time to focus on it and I also went down a few paths I ended up not liking before finding this one. Having said that I think it's close and I'm hoping to get a PR up next week.

Remaining todo:

  • Restore/cleanup tests
  • Docs
  • Balance some internal parameters. I have some hardcoded values that are balanced against our internal testing cluster that I either need to make configurable or find ways to dynamically adjust.

@PietroPasotti
Copy link

PietroPasotti commented Oct 18, 2024

Not sure this is related, but the same happens to me when hitting the search API directly via http.
Would you like me to open this as a different issue @joe-elliott?

Image

@joe-elliott
Copy link
Member

No, this is the same issue

Copy link
Contributor

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 Dec 18, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
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
Projects
None yet
Development

No branches or pull requests

4 participants