-
Notifications
You must be signed in to change notification settings - Fork 127
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
Signed-off-by: SandeepD2697 <[email protected]>
6b62eb0
to
2ff6567
Compare
Signed-off-by: SandeepD2697 <[email protected]>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.