-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Search Pipelines] Add stats for search pipelines #8053
[Search Pipelines] Add stats for search pipelines #8053
Conversation
a94b09a
to
97f64b3
Compare
Gradle Check (Jenkins) Run Completed with:
|
97f64b3
to
3f3a7bb
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
3f3a7bb
to
0d3c6db
Compare
Gradle Check (Jenkins) Run Completed with:
|
0d3c6db
to
a6a5784
Compare
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #8053 +/- ##
============================================
+ Coverage 70.89% 70.92% +0.03%
- Complexity 56639 56656 +17
============================================
Files 4722 4725 +3
Lines 267674 267987 +313
Branches 39232 39267 +35
============================================
+ Hits 189757 190063 +306
+ Misses 61937 61864 -73
- Partials 15980 16060 +80
|
88074fd
to
159e568
Compare
Gradle Check (Jenkins) Run Completed with:
|
@saratvemulapalli -- Addressed your suggestions. Windows precommit failed, but that seems to be a "Windows build server" thing and not a "this PR" thing. |
Thanks @msfroh. I've triggered a re-run of window precommit. I haven't seen failures just in Windows platform. |
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 @msfroh for taking care of the feedback.
LGTM!
Thanks, @saratvemulapalli! I resolved the open conversations, so it looks like there are no immediate merge blockers. |
Oh, the "Some checks were not successful" note seems to be there because the Mac OS precommit was canceled when the Windows precommit failed. If someone can retry the Mac OS precommit, I think that should turn green. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8053-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 46c9a211b6b9490f6a7ac9425e946986cd51bed2
# Push it to GitHub
git push --set-upstream origin backport/backport-8053-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
@msfroh needs manual backport if you want this in 2.x |
I will help with the backport to 2.x |
…#8053) * [Search Pipelines] Add stats for search pipelines This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines. Signed-off-by: Michael Froh <froh@amazon.com> * Compare parsed JSON structure, not exact JSON string As @lukas-vlcek pointed out, asserting equality with an exact JSON string is sensitive to formatting, which makes the test brittle. Instead, we can parse the expected JSON and compare as Maps. Signed-off-by: Michael Froh <froh@amazon.com> * Refactor to common stats/metrics classes Search pipelines and ingest pipelines had identical functionality for tracking metrics around operations and converting those to immutable "stats" objects. That approach isn't even really specific to pipelines, but can be used to track metrics on any repeated operation, so I moved that common logic to the common.metrics package. Signed-off-by: Michael Froh <froh@amazon.com> * Split pipeline metrics tracking into its own class Thanks @saratvemulapalli for the suggestion! This lets the Pipeline class focus on transforming requests / responses, while the subclass focuses on tracking and managing metrics. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit 46c9a21)
…#8053) * [Search Pipelines] Add stats for search pipelines This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines. Signed-off-by: Michael Froh <froh@amazon.com> * Compare parsed JSON structure, not exact JSON string As @lukas-vlcek pointed out, asserting equality with an exact JSON string is sensitive to formatting, which makes the test brittle. Instead, we can parse the expected JSON and compare as Maps. Signed-off-by: Michael Froh <froh@amazon.com> * Refactor to common stats/metrics classes Search pipelines and ingest pipelines had identical functionality for tracking metrics around operations and converting those to immutable "stats" objects. That approach isn't even really specific to pipelines, but can be used to track metrics on any repeated operation, so I moved that common logic to the common.metrics package. Signed-off-by: Michael Froh <froh@amazon.com> * Split pipeline metrics tracking into its own class Thanks @saratvemulapalli for the suggestion! This lets the Pipeline class focus on transforming requests / responses, while the subclass focuses on tracking and managing metrics. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit 46c9a21)
backport commit 46c9a21 to `2.x` branch. * [Search Pipelines] Add stats for search pipelines (#8053) This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines. Signed-off-by: Mingshi Liu <mingshl@amazon.com> Co-authored-by: Michael Froh <froh@amazon.com>
Update the version of BWC test from 3.0 to 2.9 for search pipeline statistic after the PR opensearch-project#8053 / commit opensearch-project@46c9a21 backported to 2.x branch. Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Update the version of BWC test from 3.0 to 2.9 for search pipeline statistic after the PR opensearch-project#8053 / commit opensearch-project@46c9a21 backported to 2.x branch. Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Update the version of BWC test from 3.0 to 2.9 for search pipeline statistic after the PR opensearch-project#8053 / commit opensearch-project@46c9a21 backported to 2.x branch. Signed-off-by: Mingshi Liu <mingshl@amazon.com> Signed-off-by: sahil buddharaju <sahilbud@amazon.com>
…#8053) * [Search Pipelines] Add stats for search pipelines This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines. Signed-off-by: Michael Froh <froh@amazon.com> * Compare parsed JSON structure, not exact JSON string As @lukas-vlcek pointed out, asserting equality with an exact JSON string is sensitive to formatting, which makes the test brittle. Instead, we can parse the expected JSON and compare as Maps. Signed-off-by: Michael Froh <froh@amazon.com> * Refactor to common stats/metrics classes Search pipelines and ingest pipelines had identical functionality for tracking metrics around operations and converting those to immutable "stats" objects. That approach isn't even really specific to pipelines, but can be used to track metrics on any repeated operation, so I moved that common logic to the common.metrics package. Signed-off-by: Michael Froh <froh@amazon.com> * Split pipeline metrics tracking into its own class Thanks @saratvemulapalli for the suggestion! This lets the Pipeline class focus on transforming requests / responses, while the subclass focuses on tracking and managing metrics. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com>
Update the version of BWC test from 3.0 to 2.9 for search pipeline statistic after the PR opensearch-project#8053 / commit opensearch-project@46c9a21 backported to 2.x branch. Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Hi, I wanted to friendly point out that IMO PRs like this should have had the I am maintaining external plugin (specifically the Prometheus exporter plugin) and as you can imagine renaming some of the methods to get operational stats about Ingest operations had impact (as the plugin needs to call them). Specifically: nodeIngestStats.getIngestCount() -> getCount()
nodeIngestStats.getIngestFailedCount() -> getFailedCount()
nodeIngestStats.getIngestCurrent() -> getCurrent()
nodeIngestStats.getIngestTimeInMillis() -> getTotalTimeInMillis() I totally get it that given current state of API isolation it is possible that any internal renaming is possibly a "breaking" change but hey ... it is. I do not know if it makes sense to establish a new rule about how the "breaking" label is applied but the fact is that change like this can cause compilation error somewhere else. Lukáš |
Oh, shoot. I didn't expect that. I'm not sure what the best option is there. I'll aim to add the "breaking" label if I rename an existing method in future, at least. |
@msfroh Do not feel sorry for this. I also do not know what is the solution here. We could introduce something like "internal_API_change" label which will not go to the change log but can be used on GitHub to filter tickets but it would have to be applied consistently and there is no way how to achieve this (except by increasing the work load). |
The methods to get operation stats for Ingest operations were renamed. See the following ticket for more details: <opensearch-project/OpenSearch#8053> Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
The methods to get operation stats for Ingest operations were renamed. See the following ticket for more details: <opensearch-project/OpenSearch#8053> Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
…#8053) * [Search Pipelines] Add stats for search pipelines This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines. Signed-off-by: Michael Froh <froh@amazon.com> * Compare parsed JSON structure, not exact JSON string As @lukas-vlcek pointed out, asserting equality with an exact JSON string is sensitive to formatting, which makes the test brittle. Instead, we can parse the expected JSON and compare as Maps. Signed-off-by: Michael Froh <froh@amazon.com> * Refactor to common stats/metrics classes Search pipelines and ingest pipelines had identical functionality for tracking metrics around operations and converting those to immutable "stats" objects. That approach isn't even really specific to pipelines, but can be used to track metrics on any repeated operation, so I moved that common logic to the common.metrics package. Signed-off-by: Michael Froh <froh@amazon.com> * Split pipeline metrics tracking into its own class Thanks @saratvemulapalli for the suggestion! This lets the Pipeline class focus on transforming requests / responses, while the subclass focuses on tracking and managing metrics. Signed-off-by: Michael Froh <froh@amazon.com> --------- Signed-off-by: Michael Froh <froh@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Update the version of BWC test from 3.0 to 2.9 for search pipeline statistic after the PR opensearch-project#8053 / commit opensearch-project@46c9a21 backported to 2.x branch. Signed-off-by: Mingshi Liu <mingshl@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
This adds statistics on executions and time spent on search pipeline operations, similar to the stats that are available for ingest pipelines.
Related Issues
Resolves #6723
Check List
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.