This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 186
Added metrics for SQL query requests in new engine #905
Merged
chloe-zh
merged 4 commits into
opendistro-for-elasticsearch:develop
from
chloe-zh:metrics-publish
Dec 16, 2020
Merged
Added metrics for SQL query requests in new engine #905
chloe-zh
merged 4 commits into
opendistro-for-elasticsearch:develop
from
chloe-zh:metrics-publish
Dec 16, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## develop #905 +/- ##
=============================================
+ Coverage 99.85% 99.86% +0.01%
- Complexity 2148 2315 +167
=============================================
Files 216 230 +14
Lines 4850 5329 +479
Branches 320 346 +26
=============================================
+ Hits 4843 5322 +479
Misses 5 5
Partials 2 2 Continue to review full report at Codecov.
|
dai-chen
reviewed
Dec 10, 2020
...rc/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java
Outdated
Show resolved
Hide resolved
dai-chen
reviewed
Dec 11, 2020
...rc/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java
Show resolved
Hide resolved
...rc/main/java/com/amazon/opendistroforelasticsearch/sql/legacy/plugin/RestSQLQueryAction.java
Outdated
Show resolved
Hide resolved
penghuo
approved these changes
Dec 15, 2020
dai-chen
approved these changes
Dec 15, 2020
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.
Thanks for the changes!
penghuo
pushed a commit
to penghuo/sql
that referenced
this pull request
Dec 17, 2020
…asticsearch#905) * added metrics in sql new engine query action when errors occur during query execution * addressed comments * update * take all errors from new query engine as server errors
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Currently the strategy of the rest query action can inform the metrics and increment the request total before deciding which engine the query should go into. But after the query comes to the new engine, the metrics publish is missing if any error turns up during executing or explaining in new engine (while the old engine can still publish the metrics if meets with errors).
This pull request is to add metrics publish when new engine meets request failure. If the exception
QueryEngineException
type of its extension type, the stats for failed request count in server (FAILED_REQ_COUNT_SYS
) increments. Else the stats for failed request count in client (FAILED_REQ_COUNT_CUS
) increments.Besides here also adds the metrics integration tests of success request cases for SQL query requests in new engine.
The failure cases are not tested in integration test because time amount to finish the metrics update might vary. Here attaches the manual sanity test of related stats in metrics, the sleep time was set to 30s, the stats were obtained from local ES log:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.