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

feat: adding Elastic as a metric provider #3890

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SandeepD2697
Copy link

fixes #3727

Hey @mowies I have taken the code changes from the previous contributors and updated it accordingly by adding it in the provider.go and calling when it is elastic. This is my initial version please have a look and let me know the changes I need to make or any enhancements.

For now the methods purpose are-

GetElasticClient: Creates a new Elasticsearch client.
FetchAnalysisValue: Runs a query to get analysis results and returns the metric value.
EvaluateQuery: Runs a metric query for the last 30 minutes and returns the metric value.
runElasticQuery: Executes a query on Elasticsearch and returns the result.
extractMetric: Gets the metric value from the Elasticsearch result.

@SandeepD2697 SandeepD2697 changed the title feature: adding Elastic as a metric provider feat: adding Elastic as a metric provider Mar 4, 2025
Signed-off-by: SandeepD2697 <[email protected]>
Copy link

sonarqubecloud bot commented Mar 4, 2025

@SandeepD2697
Copy link
Author

@mowies @odubajDT Can you please have a look at this when you got some time

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.22%. Comparing base (9d026b8) to head (f33d9bf).

❗ There is a different number of reports uploaded between BASE (9d026b8) and HEAD (f33d9bf). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (9d026b8) HEAD (f33d9bf)
metrics-operator 1 0
lifecycle-operator 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3890       +/-   ##
===========================================
- Coverage   77.70%   53.22%   -24.49%     
===========================================
  Files         219       37      -182     
  Lines       11575     2747     -8828     
===========================================
- Hits         8994     1462     -7532     
+ Misses       2216     1131     -1085     
+ Partials      365      154      -211     

see 196 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 47.44% <ø> (ø)
component-tests 57.53% <ø> (-21.68%) ⬇️
lifecycle-operator ?
metrics-operator ?

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Integrating Keptn with ELK Stack
1 participant