-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add statistics to query_range and instant_query API. #1615
Conversation
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
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.
This is looking great! I just have one question about how it's exposed to the user. I remember some internal conversations about matching what Prometheus does.
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
abd3020
to
cf28e00
Compare
Codecov Report
@@ Coverage Diff @@
## master #1615 +/- ##
=========================================
Coverage ? 61.69%
=========================================
Files ? 109
Lines ? 8260
Branches ? 0
=========================================
Hits ? 5096
Misses ? 2770
Partials ? 394
|
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
This is ready for reviews. /cc @owen-d |
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 other than two indentation problems
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
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 🎉
This introduces a new statistics property to the query_range, instant_query API and also the old query API.
The frontend also honor and merge those statistics although there is two small caveats:
I think it would be useful may be to add more frontend (eg. amount of split, result cache hit) and chunk/index cache statistics in the long term. But this seems like a good start.
The statistics property contains informations about the execution of the query such as processed lines/bytes per seconds from storage and ingesters.
This is a draft PR as I have to rebase and add API documentation for this.
PS: Unfortunately the Cortex result cache used for metrics requires protof response type and since Cortex wasn't using the same gogoproto version I had to downgrade our version to (1.2.1) until we are in sync, there is only minor bugfix that we don't use in 1.3.0 and I've also opened a PR in Cortex to make the change. See cortexproject/cortex#2055