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

Generate Recommendations with MetricProfile queries #1237

Merged

Conversation

shreyabiradar07
Copy link
Contributor

Description

This PR has the following changes:

  • Integrates MetricProfile with local_monitoring experiments
  • Generates recommendations by fetching metric queries dynamically from MetricProfile instead of constant values

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

  • New Test X
  • Functional testsuite

Test Configuration

  • Kubernetes clusters tested on: minikube

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

.

@shreyabiradar07 shreyabiradar07 added local_monitoring kruize-local Tag for mentioning all the PR's and issues raised which covers the kruize local monitoring usecase labels Jul 15, 2024
@shreyabiradar07 shreyabiradar07 self-assigned this Jul 15, 2024
@shreyabiradar07 shreyabiradar07 marked this pull request as ready for review July 16, 2024 06:39
}

promQL = promQL
.replace(AnalyzerConstants.NAMESPACE_VARIABLE, namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add some more replace like workload type , name etc
please refer to kusuma's latest PR's quires

* @param dataSourceInfo
* @throws Exception
*/
public void fetchMetricsBasedOnProfileAndDatasource(KruizeObject kruizeObject, Timestamp interval_end_time, Timestamp interval_start_time, DataSourceInfo dataSourceInfo) throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

1 Transfer DSMetadata queries to the metric profile.

  1. Relocate Container last active date queries to the metric
    profile and update the code to reference queries using the metric profile.

  2. Adjust requests and limit queries to avoid using query_range.

@chandrams chandrams merged commit 34b7b11 into kruize:202407-hackathon Jul 30, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kruize-local Tag for mentioning all the PR's and issues raised which covers the kruize local monitoring usecase local_monitoring remote_monitoring
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants