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

Added session, statement, emrjob metrics to sql stats api #2398

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

vamsi-amazon
Copy link
Member

@vamsi-amazon vamsi-amazon commented Oct 31, 2023

Description

Added new metrics to stats API.
Below are the list of new metrics.

  DATASOURCE_CREATION_REQ_COUNT("datasource_create_request_count"),
  DATASOURCE_GET_REQ_COUNT("datasource_get_request_count"),
  DATASOURCE_PUT_REQ_COUNT("datasource_put_request_count"),
  DATASOURCE_PATCH_REQ_COUNT("datasource_patch_request_count"),
  DATASOURCE_DELETE_REQ_COUNT("datasource_delete_request_count"),
  DATASOURCE_FAILED_REQ_COUNT_SYS("datasource_failed_request_count_syserr"),
  DATASOURCE_FAILED_REQ_COUNT_CUS("datasource_failed_request_count_cuserr"),
  EMR_START_JOB_REQUEST_FAILURE_COUNT("emr_start_job_request_failure_count"),
  EMR_GET_JOB_RESULT_FAILURE_COUNT("emr_get_job_request_failure_count"),
  EMR_CANCEL_JOB_REQUEST_FAILURE_COUNT("emr_cancel_job_request_failure_count"),
  EMR_STREAMING_QUERY_JOBS_CREATION_COUNT("emr_streaming_jobs_creation_count"),
  EMR_INTERACTIVE_QUERY_JOBS_CREATION_COUNT("emr_interactive_jobs_creation_count"),
  EMR_BATCH_QUERY_JOBS_CREATION_COUNT("emr_batch_jobs_creation_count"),
  ACTIVE_ASYNC_QUERY_SESSION_COUNT("active_async_query_session_count"),
  ACTIVE_ASYNC_QUERY_STATEMENT_COUNT("active_async_query_statement_count");

Basic Testing of stats API

{
emr_interactive_jobs_creation_count: 0,
default_cursor_request_count: 0,
default_cursor_request_total: 0,
ppl_failed_request_count_syserr: 0,
datasource_failed_request_count_cuserr: 0,
request_total: 0,
datasource_failed_request_count_syserr: 0,
datasource_delete_request_count: 0,
active_async_query_statement_count: 0,
failed_request_count_cb: 0,
datasource_patch_request_count: 0,
datasource_put_request_count: 0,
ppl_failed_request_count_cuserr: 0,
ppl_request_total: 0,
emr_streaming_jobs_creation_count: 0,
active_async_query_session_count: 0,
datasource_get_request_count: 0,
circuit_breaker: 0,
request_count: 0,
emr_cancel_job_request_failure_count: 0,
emr_batch_jobs_creation_count: 0,
emr_get_job_request_failure_count: 0,
failed_request_count_cuserr: 0,
emr_start_job_request_failure_count: 0,
ppl_request_count: 0,
failed_request_count_syserr: 0,
datasource_create_request_count: 0
}

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #2398 (6a9c711) into main (cb8d953) will decrease coverage by 0.08%.
The diff coverage is 62.50%.

@@             Coverage Diff              @@
##               main    #2398      +/-   ##
============================================
- Coverage     95.62%   95.54%   -0.08%     
  Complexity     4985     4985              
============================================
  Files           478      478              
  Lines         13854    13883      +29     
  Branches        930      931       +1     
============================================
+ Hits          13248    13265      +17     
- Misses          586      598      +12     
  Partials         20       20              
Flag Coverage Δ
sql-engine 95.54% <62.50%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ces/transport/TransportCreateDataSourceAction.java 100.00% <100.00%> (ø)
...ces/transport/TransportDeleteDataSourceAction.java 100.00% <100.00%> (ø)
...ources/transport/TransportGetDataSourceAction.java 100.00% <100.00%> (ø)
...rces/transport/TransportPatchDataSourceAction.java 100.00% <100.00%> (ø)
...ces/transport/TransportUpdateDataSourceAction.java 100.00% <100.00%> (ø)
...arch/sql/spark/client/EmrServerlessClientImpl.java 100.00% <100.00%> (ø)
...search/sql/spark/dispatcher/BatchQueryHandler.java 100.00% <100.00%> (ø)
.../sql/spark/dispatcher/InteractiveQueryHandler.java 100.00% <100.00%> (ø)
...ch/sql/spark/dispatcher/StreamingQueryHandler.java 100.00% <100.00%> (ø)
...ql/datasources/rest/RestDataSourceQueryAction.java 0.00% <0.00%> (ø)
... and 1 more

penghuo
penghuo previously approved these changes Oct 31, 2023
ps48
ps48 previously approved these changes Oct 31, 2023
Copy link
Collaborator

@anirudha anirudha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@vamsi-amazon vamsi-amazon merged commit 940980e into opensearch-project:main Oct 31, 2023
19 of 21 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 940980e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 31, 2023
Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 940980e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vamsi-amazon pushed a commit that referenced this pull request Oct 31, 2023
)

(cherry picked from commit 940980e)

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
penghuo pushed a commit that referenced this pull request Oct 31, 2023
)

(cherry picked from commit 940980e)

Signed-off-by: Vamsi Manohar <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mengweieric added a commit to mengweieric/sql that referenced this pull request Nov 8, 2023
mengweieric added a commit to mengweieric/sql that referenced this pull request Nov 8, 2023
vamsi-amazon added a commit that referenced this pull request Nov 13, 2023
* Revert "Add more metrics and handle emr exception message (#2422) (#2426)"

This reverts commit b57f7cc.

* Revert "Block settings in sql query settings API and add more unit tests (#2407) (#2412)"

This reverts commit 3024737.

* Revert "Added session, statement, emrjob metrics to sql stats api (#2398) (#2400)"

This reverts commit 6e17ae6.

* Revert "Redefine Drop Index as logical delete (#2386) (#2397)"

This reverts commit e939bb6.

* Revert "add concurrent limit on datasource and sessions (#2390) (#2395)"

This reverts commit deb3ccf.

* Revert "Add Flint Index Purging Logic (#2372) (#2389)"

This reverts commit dd48b9b.

* Revert "Refactoring for tags usage in test files and also added explicit denly list setting. (#2383) (#2385)"

This reverts commit 37e010f.

* Revert "Enable session by default (#2373) (#2375)"

This reverts commit 7d95e4c.

* Revert "Create new session if client provided session is invalid (#2368) (#2371)"

This reverts commit 5ab7858.

* Revert "Add where clause support in create statement (#2366) (#2370)"

This reverts commit b620a56.

* Revert "create new session if current session not ready (#2363) (#2365)"

This reverts commit 5d07281.

* Revert "Handle Describe,Refresh and Show Queries Properly (#2357) (#2362)"

This reverts commit 16e2f30.

* Revert "Add Session limitation (#2354) (#2359)"

This reverts commit 0f334f8.

* Revert "Bug Fix, support cancel query in running state (#2351) (#2353)"

This reverts commit 9a40591.

* Revert "Fix bug, using basic instead of basicauth (#2342) (#2355)"

This reverts commit e4827a5.

* Revert "Add missing tags and MV support (#2336) (#2346)"

This reverts commit 8791bb0.

* Revert "[Backport 2.x] deprecated job-metadata-index (#2340) (#2343)"

This reverts commit bea432c.

* Revert "Integration with REPL Spark job (#2327) (#2338)"

This reverts commit 58a5ae5.

* Revert "Implement patch API for datasources (#2273) (#2329)"

This reverts commit 4c151fe.

* Revert "Add sessionId parameters for create async query API (#2312) (#2324)"

This reverts commit 3d1a376.

* Revert "Add Statement (#2294) (#2318) (#2319)"

This reverts commit b3c2e94.

* Revert "Upgrade json (#2307) (#2314)"

This reverts commit 6c65bb4.

* Revert "Minor Refactoring (#2308) (#2317)"

This reverts commit 051cc4f.

* Revert "add InteractiveSession and SessionManager (#2290) (#2293) (#2315)"

This reverts commit 6ac197b.

---------

Co-authored-by: Vamsi Manohar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants