-
Notifications
You must be signed in to change notification settings - Fork 406
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
Modify prometheus monitor #974
Modify prometheus monitor #974
Conversation
const response = await this.prometheusQueryClient.getByEncodedUrl(queryString); | ||
|
||
// Retrieve base mapped statistics and coerce into correct format | ||
const resultMap = PrometheusQueryHelper.extractStatisticFromRange(response, params.statistic, params.label); | ||
const resultMap = PrometheusQueryHelper.extractStatisticFromRange(response, queryObject.statistic, queryObject.label); |
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.
would be good if this variable described what it actually contained
|
||
const metricArray = []; | ||
let newQuery = true; | ||
for (const [key, value] of resultMap.entries()) { |
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.
can be be a bit more descriptive on what a key really is and what the value might be ?
* @param {string} key the key to test fro inclusion | ||
* @returns {boolean} boolean flag for inclusion | ||
*/ | ||
includeStatistic(key) { |
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.
can we be more specific then just key
?
|
||
/** | ||
* Check if the passed key should be included | ||
* @param {string} key the key to test fro inclusion |
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.
fro -> for
2b45c1d
to
3db3ce2
Compare
const resourceStats = []; | ||
const chartArray = []; | ||
for (const metricKey of Object.keys(this.include)) { | ||
let newKey = true; | ||
for (const queryObject of this.queries) { | ||
// Each metric is of the form |
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.
Comment say's metric, but all I see is queryObject so not sure how they relate.
Signed-off-by: [email protected] <[email protected]>
3db3ce2
to
02be251
Compare
Contributes to #964
Requires companion docs for breaking change
Signed-off-by: [email protected] [email protected]