-
Notifications
You must be signed in to change notification settings - Fork 621
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
API for exposing query analysis #3276
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.
Great job! 🎉
I believe this a very good starting point of making the read path more transparent. Ideally, we could also collect the actual execution statistics and report them along the way with the query results (like EXPLAIN ANALYZE
in SQL).
Querying series might be fairly expensive in some cases (e.g., if there are high cardinality labels in the data set), therefore we should be careful calling the analysis. Also, Series
API reports matching series in the block not accounting for the time range, which should not pose an issue in vast majority of cases – just a clarification: for example, you may query 15 minutes and get no data, and the analysis will tell you that there are 5 matching series
This reverts commit 649c2cce206e95d01ab0a80b6f15450d96b38d97.
4983a17
to
0deea6e
Compare
Thanks @kolesnikovae.
Agreed. The purpose of this first iteration is to provide an efficient endpoint that could be used before the actual query, serving as a sanity check for the query itself.
I didn't know
I added tenant-level overrides for now, one for the entire endpoint ( |
Exposes a new API that provides insights into the amount of data in the queried time range, as well as the number of unique series reached via the label selector.
Example output (note that numbers are serialized as strings):
To be extended in the future with an estimate of the query execution time and other statistics.
Closes #3001