[Feature] Integrate SQL/PPL with query-insights plugin#5636
[Feature] Integrate SQL/PPL with query-insights plugin#5636KishoreKicha14 wants to merge 1 commit into
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit c3e375a.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍(Review updated until commit c3e375a)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to c3e375a Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit a38aeb9
Suggestions up to commit 70cb9db
Suggestions up to commit 1e86aa4
Suggestions up to commit 8c958a8
Suggestions up to commit 705b115
|
705b115 to
8c958a8
Compare
|
Persistent review updated to latest commit 8c958a8 |
8c958a8 to
1e86aa4
Compare
|
Persistent review updated to latest commit 1e86aa4 |
1e86aa4 to
70cb9db
Compare
|
Persistent review updated to latest commit 70cb9db |
|
Persistent review updated to latest commit a38aeb9 |
70cb9db to
314e568
Compare
Propagate SQL/PPL query metadata to OpenSearch's query-insights plugin so that DSL queries generated by the SQL engine are identifiable and traceable back to their originating SQL/PPL statement. Changes: - Add thread context headers (x-query-source, x-original-query, x-query-execution-id, x-query-phases) set before DSL execution - Register headers via getTaskHeaders() so TaskManager copies them into SearchTask for query-insights to read - Add QueryPhaseTracker to instrument parse/analyze/plan phases with wall-clock time, CPU time, and memory allocation per phase - Execution ID links multiple DSL queries from a single SQL/PPL execution (e.g., JOINs, pagination) - Truncate original query to 4096 chars to prevent oversized headers - Error handling: try-catch in startOrRestore() and writePhaseHeader() - Add unit tests for QueryPhaseTracker (18 tests) Signed-off-by: Kishore Natarajan <kkumaarn@amazon.com>
42927c2 to
78e60a8
Compare
|
Persistent review updated to latest commit c3e375a |
a38aeb9 to
42927c2
Compare
Propagate SQL/PPL query metadata to OpenSearch's query-insights plugin so that DSL queries generated by the SQL engine are identifiable and traceable back to their originating SQL/PPL statement.
Changes:
Description
[Describe what this change achieves]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoffor-s.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.