-
Notifications
You must be signed in to change notification settings - Fork 56
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
3. Add MetadataProfile database #1441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
*/ | ||
@Override | ||
public List<KruizeLMMetadataProfileEntry> loadAllMetadataProfiles() throws Exception { | ||
String statusValue = "failure"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyabiradar07 where is statusValue being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out, I have added timer metrics which use the statusValue
to track metrics for each database operation.
* @throws Exception | ||
*/ | ||
public List<KruizeLMMetadataProfileEntry> loadMetadataProfileByName(String metadataProfileName) throws Exception { | ||
String statusValue = "failure"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyabiradar07 In other methods there is a finally block too that uses the statusValue, I think it is required here too. Can you check and add it.
finally {
if (null != timerLoadAllRec) {
MetricsConfig.timerLoadAllRec = MetricsConfig.timerBLoadAllRec.tag("status", statusValue).register(MetricsConfig.meterRegistry());
timerLoadAllRec.stop(MetricsConfig.timerLoadAllRec);
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have included the finally blocks with the new timer metrics added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shreyabiradar07 Have you tested the timer metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try to query one of the above DB methods - loadAllMetadataProfiles
currently the output is empty.
curl -G --data-urlencode 'query=kruizeDB_count{method="loadAllMetadataProfiles", application="Kruize", status="success"}' "http://localhost:9090/api/v1/query"
{"status":"success","data":{"resultType":"vector","result":[]}}
The database methods added as part of this PR are currently not being invoked. These methods added will be used in the subsequent PRs with MetadataProfile REST APIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR introduces new database table and basic DB functions for MetadataProfile
Fixes # (issue)
Type of change
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.
Test Configuration
Checklist 🎯
Additional information
.