-
Notifications
You must be signed in to change notification settings - Fork 543
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
Query Frontend: Expose samples_processed in Server-Timing header #10103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a comment about the naming. "total samples" may mean "total raw samples processed" or "total number of samples returned by the query". The cost of a query is a function of the actual raw samples processed, not returned. If that's what you're going to track (as I would expect) then we may consider renaming it to "samples processed" (to keep it consistent with "bytes processed" that we already have).
c373bdd
to
cc1117d
Compare
@pracucci 's feedback is acknowledged and MQE support will be added in another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd like to see the Stats
tests expanded to cover the new SamplesProcessed
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, mod Charles and Marco's comments
The CHANGELOG has just been cut to prepare for the next release. Please rebase |
Ready for review again. Testing updated. CHANGELOG updated also. |
560ff96
to
a39869b
Compare
…s affecting other tests and Mimir doesn't support Prometheus' UTF-8 metric/label name scheme yet.
a39869b
to
2969331
Compare
Branch got out of sync with main. I also updated a test that was making other tests fail because it was enabling UTF-8 support. |
}, | ||
"sparse_series": { | ||
expr: `sparse_series{}`, | ||
expectedTotalSamples: 5 + 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be 2 because there are only two samples
sparse_series 0 _ _ _ _ _ _ 7 _ _ _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely sure why, but in that case, the engine is returning [0, "0"], [60, "0"], [120, "0"], [180, "0"], [240, "0"], [420, "7"], [480, "7"], [540, "7"], [600, "7"]
which equal to 9 samples. I also assumed 2 samples beforehand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if it's not because of the lookback period of 5 minutes. Can you quickly verify that it is? It's configurable on the promQL engine config via LookbackDelta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I tried different LookbackDelta
values and it's consistent with the samples returned.
What this PR does
This PR will make the Query frontend expose samples_processed in Server-Timing header. It is complementary to #9985 and this in the effort of measuring throughput on Mimir.
This was worked on by @krajorama before #7966, but I decided to open a different PR as the idea has evolved overtime.
Which issue(s) this PR fixes or relates to
Not related to an specific issue.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.