opensearch-project / performance-analyzer

📈 Get detailed performance metrics from your cluster independently of the Java Virtual Machine (JVM)
https://opensearch.org/docs/latest/monitoring-plugins/pa/index/
Apache License 2.0
36 stars 66 forks source link

SearchBackPressure Service Collector added #483

Closed CoderJeffrey closed 1 year ago

CoderJeffrey commented 1 year ago

Signed-off-by: Jeffrey Liu ujeffliu@amazon.com

Is your feature request related to a problem? Please provide an existing Issue # , or describe. Add the functionality to gather the SearchBackPressure Service.

Describe the solution you are proposing Add SearchBackPressureStatsCollector.java to collect SearchBackPressure related metrics, and added Unit Testing for SearchBackPressureStatsCollector.java.

Describe alternatives you've considered N/A

Additional context

  1. Changes in licenses/ are auto-created after running ./build gradlew

  2. In order to access the Constants field in this collector, another pull & request for performance-analyzer-commons package has been made.

    Example: @JsonProperty(SearchBackPressureStatsValue.Constants.SEARCHBP_NODEID) public String getSearchBackPressureStats_NodeId() { return this.nodeId; }

    Parallel Pull & Request link: https://github.com/opensearch-project/performance-analyzer-commons/pull/33

    Approving this pull & request will be needed in order for the collector to access the Performance-Analyzer-Commons Constants fields. Or else, error would occur.

  3. Can verify the extracted search_back_pressure metrics in /dev/shm/performanceanalyzer directory, open any log file, and search for "search_back_pressure"

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.

codecov[bot] commented 1 year ago

Codecov Report

Merging #483 (59a78bc) into main (5428a52) will increase coverage by 0.18%. The diff coverage is 75.92%.

:exclamation: Current head 59a78bc differs from pull request most recent head 1a0b4ed. Consider uploading reports for the commit 1a0b4ed to get more accurate results

@@             Coverage Diff              @@
##               main     #483      +/-   ##
============================================
+ Coverage     73.67%   73.85%   +0.18%     
- Complexity      375      381       +6     
============================================
  Files            44       45       +1     
  Lines          2477     2693     +216     
  Branches        172      172              
============================================
+ Hits           1825     1989     +164     
- Misses          544      596      +52     
  Partials        108      108              
Impacted Files Coverage Δ
...r/collectors/SearchBackPressureStatsCollector.java 75.70% <75.70%> (ø)
...performanceanalyzer/PerformanceAnalyzerPlugin.java 77.14% <100.00%> (+0.21%) :arrow_up:
...org/opensearch/performanceanalyzer/util/Utils.java 92.50% <100.00%> (+0.19%) :arrow_up:
CoderJeffrey commented 1 year ago

In order to access the Constants field in this collector, another pull & request for performance-analyzer-commons package has been made.

Example: @JsonProperty(SearchBackPressureStatsValue.Constants.SEARCHBP_NODEID) public String getSearchBackPressureStats_NodeId() { return this.nodeId; }

Parallel Pull & Request link: https://github.com/opensearch-project/performance-analyzer-commons/pull/33 Approving this pull & request will be needed in order for the collector to access the commons constant fields. Or else, error would occur.

getsaurabh02 commented 1 year ago

Can we cleanup the bunch of jars which got along with the commit making the file changes as 37?

CoderJeffrey commented 1 year ago

Can we cleanup the bunch of jars which got along with the commit making the file changes as 37?

Just cleaned up all jars.