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

changes to merge PA-RTF #651

Closed atharvasharma61 closed 3 months ago

atharvasharma61 commented 5 months ago

Implementation and extension of Issue: #585

Code changes w.r.t. merging PA with Open Telemetry

Changes:

  1. Framework changes to leverage otel functionality in PA.
  2. Added RTF collectors which now publish same metrics in opentelemetry format as well.
  3. Added support to control RTF Collectors and existing RCA collectors dynamically at runtime at cluster level through API calls.

Dependent Changes: Commons-repo -> https://github.com/opensearch-project/performance-analyzer-commons/pull/74

/*

 0 -> Only RCA collectors enabled - CollectorMode: RCA
1 -> Only Telemetry collectors enabled -  CollectorMode: OTEL
2 -> Both RCA and Telemetry Collectors Enabled - CollectorMode: DUAL

*/

curl localhost:9200/_opendistro/_performanceanalyzer/cluster/config -H 'Content-Type: application/json' -d '{"collectorsSetting": 0}'

Is your feature request related to a problem? Please provide an existing Issue # , or describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you are proposing

Describe alternatives you've considered

Additional context

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.

atharvasharma61 commented 5 months ago

https://pastecode.io/s/9bksb3ak Heap metrics

ansjcy commented 5 months ago

Hi @atharvasharma61! This looks like an interesting change, do we have any rfc/doc to provide more context?

Gaganjuneja commented 3 months ago

Overall looks good, please address the open comments and build failures.

Gaganjuneja commented 3 months ago

I am hoping there are changes in performance-analyzer-commons package also in class ScheduledMetricCollectorsExecutor. Please attache that PR also here.

atharvasharma61 commented 3 months ago

One more thing to call-out: We need to enable delta temporality in Opensearch Otel. @Gaganjuneja

Gaganjuneja commented 3 months ago

Please take a look at build failures.

atharvasharma61 commented 3 months ago

Please take a look at build failures.

Dependent on PRs: https://github.com/opensearch-project/performance-analyzer/pull/657 and https://github.com/opensearch-project/performance-analyzer-commons/pull/74

opensearch-trigger-bot[bot] commented 3 months ago

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

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
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-651-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 17611035b0519b96de809da2ccb07ea9b4107ede
# Push it to GitHub
git push --set-upstream origin backport/backport-651-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-651-to-2.x.