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

changes to merge PA-RTF #651

Merged
merged 36 commits into from
Jun 11, 2024
Merged

Conversation

atharvasharma61
Copy link
Contributor

@atharvasharma61 atharvasharma61 commented Apr 25, 2024

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 -> opensearch-project/performance-analyzer-commons#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

  • Backport Labels added.
  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc 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.

atharvasharma61 and others added 6 commits April 22, 2024 19:41
Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
@atharvasharma61
Copy link
Contributor Author

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

@ansjcy
Copy link
Member

ansjcy commented Apr 25, 2024

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

@atharvasharma61 atharvasharma61 changed the title Draft PR for changes related to PA RTF merging PA-RTF merge May 31, 2024
@atharvasharma61 atharvasharma61 changed the title PA-RTF merge changes to merge PA-RTF May 31, 2024
Signed-off-by: Atharva Sharma <[email protected]>
@atharvasharma61
Copy link
Contributor Author

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

Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Atharva Sharma <[email protected]>
Gaganjuneja
Gaganjuneja previously approved these changes Jun 6, 2024
@Gaganjuneja
Copy link
Collaborator

Please take a look at build failures.

@atharvasharma61
Copy link
Contributor Author

Please take a look at build failures.

Dependent on PRs: #657 and opensearch-project/performance-analyzer-commons#74

import org.opensearch.telemetry.metrics.MetricsRegistry;
import org.opensearch.telemetry.metrics.tags.Tags;

public class RTFDisksCollector extends PerformanceAnalyzerMetricsCollector
Copy link
Collaborator

@nishchay21 nishchay21 Jun 8, 2024

Choose a reason for hiding this comment

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

please add java doc on all collectors

nishchay21
nishchay21 previously approved these changes Jun 10, 2024
Signed-off-by: Gagan Juneja <[email protected]>
@Gaganjuneja Gaganjuneja dismissed stale reviews from nishchay21 and themself via 44f0b7c June 10, 2024 16:35
@Gaganjuneja Gaganjuneja merged commit 1761103 into opensearch-project:main Jun 11, 2024
3 of 5 checks passed
@opensearch-trigger-bot
Copy link
Contributor

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.

devagarwal1803 pushed a commit to devagarwal1803/performance-analyzer that referenced this pull request Jun 11, 2024
* PA RTF merging init

Signed-off-by: Atharva Sharma <[email protected]>

* working model

Signed-off-by: Atharva Sharma <[email protected]>

* working model tip

Signed-off-by: Atharva Sharma <[email protected]>

* functional model init

Signed-off-by: Atharva Sharma <[email protected]>

* Migrated HeapMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* Added RTFThreadPoolMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* migrated NodeStats and DiskMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* Added gauge data model for Heap_Max metric

Signed-off-by: Atharva Sharma <[email protected]>

* implemented TelemetryAwarePlugin

Signed-off-by: Atharva Sharma <[email protected]>

* Framework changes for PA RTF merging

Signed-off-by: Atharva Sharma <[email protected]>

* refactored

Signed-off-by: Atharva Sharma <[email protected]>

* spotless applied

Signed-off-by: Atharva Sharma <[email protected]>

* Addressed small comments

Signed-off-by: Atharva Sharma <[email protected]>

* Added different flag for RCA collectors

Signed-off-by: Atharva Sharma <[email protected]>

* Addressed more comments

Signed-off-by: Atharva Sharma <[email protected]>

* Added RTF collectors in config map

Signed-off-by: Atharva Sharma <[email protected]>

* Added UTs

Signed-off-by: Atharva Sharma <[email protected]>

* Added further UTs

Signed-off-by: Atharva Sharma <[email protected]>

* Added dynamic control support to all collectors

Signed-off-by: Atharva Sharma <[email protected]>

* fixed UT

Signed-off-by: Atharva Sharma <[email protected]>

* refactoring

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "refactoring"

This reverts commit 25d66e8.

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "fixed UT"

This reverts commit 369bd95.

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "Added dynamic control support to all collectors"

This reverts commit 447e15f.

Signed-off-by: Atharva Sharma <[email protected]>

* Adding two new collector interfaces

Signed-off-by: Atharva Sharma <[email protected]>

* simplified interfaces

Signed-off-by: Atharva Sharma <[email protected]>

* Added units and javadocs

Signed-off-by: Atharva Sharma <[email protected]>

* Changes metrics semantic conventions

Signed-off-by: Atharva Sharma <[email protected]>

* refactored

Signed-off-by: Atharva Sharma <[email protected]>

* fixed UT

Signed-off-by: Atharva Sharma <[email protected]>

* Added stats metrics for rtf collectors

Signed-off-by: Atharva Sharma <[email protected]>

* reverted test delete

Signed-off-by: Atharva Sharma <[email protected]>

* Fixes javadoc compilation issue

Signed-off-by: Gagan Juneja <[email protected]>

---------

Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Gagan Juneja <[email protected]>
Co-authored-by: Gagan Juneja <[email protected]>
nishchay21 pushed a commit that referenced this pull request Jun 11, 2024
* changes to merge PA-RTF (#651)

* PA RTF merging init

Signed-off-by: Atharva Sharma <[email protected]>

* working model

Signed-off-by: Atharva Sharma <[email protected]>

* working model tip

Signed-off-by: Atharva Sharma <[email protected]>

* functional model init

Signed-off-by: Atharva Sharma <[email protected]>

* Migrated HeapMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* Added RTFThreadPoolMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* migrated NodeStats and DiskMetricsCollector

Signed-off-by: Atharva Sharma <[email protected]>

* Added gauge data model for Heap_Max metric

Signed-off-by: Atharva Sharma <[email protected]>

* implemented TelemetryAwarePlugin

Signed-off-by: Atharva Sharma <[email protected]>

* Framework changes for PA RTF merging

Signed-off-by: Atharva Sharma <[email protected]>

* refactored

Signed-off-by: Atharva Sharma <[email protected]>

* spotless applied

Signed-off-by: Atharva Sharma <[email protected]>

* Addressed small comments

Signed-off-by: Atharva Sharma <[email protected]>

* Added different flag for RCA collectors

Signed-off-by: Atharva Sharma <[email protected]>

* Addressed more comments

Signed-off-by: Atharva Sharma <[email protected]>

* Added RTF collectors in config map

Signed-off-by: Atharva Sharma <[email protected]>

* Added UTs

Signed-off-by: Atharva Sharma <[email protected]>

* Added further UTs

Signed-off-by: Atharva Sharma <[email protected]>

* Added dynamic control support to all collectors

Signed-off-by: Atharva Sharma <[email protected]>

* fixed UT

Signed-off-by: Atharva Sharma <[email protected]>

* refactoring

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "refactoring"

This reverts commit 25d66e8.

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "fixed UT"

This reverts commit 369bd95.

Signed-off-by: Atharva Sharma <[email protected]>

* Revert "Added dynamic control support to all collectors"

This reverts commit 447e15f.

Signed-off-by: Atharva Sharma <[email protected]>

* Adding two new collector interfaces

Signed-off-by: Atharva Sharma <[email protected]>

* simplified interfaces

Signed-off-by: Atharva Sharma <[email protected]>

* Added units and javadocs

Signed-off-by: Atharva Sharma <[email protected]>

* Changes metrics semantic conventions

Signed-off-by: Atharva Sharma <[email protected]>

* refactored

Signed-off-by: Atharva Sharma <[email protected]>

* fixed UT

Signed-off-by: Atharva Sharma <[email protected]>

* Added stats metrics for rtf collectors

Signed-off-by: Atharva Sharma <[email protected]>

* reverted test delete

Signed-off-by: Atharva Sharma <[email protected]>

* Fixes javadoc compilation issue

Signed-off-by: Gagan Juneja <[email protected]>

---------

Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Gagan Juneja <[email protected]>
Co-authored-by: Gagan Juneja <[email protected]>

* Empty-Commit

Signed-off-by: Dev Agarwal <[email protected]>

---------

Signed-off-by: Atharva Sharma <[email protected]>
Signed-off-by: Gagan Juneja <[email protected]>
Signed-off-by: Dev Agarwal <[email protected]>
Co-authored-by: Atharva Sharma <[email protected]>
Co-authored-by: Gagan Juneja <[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