* add error handling for prom query builder returning undefined metrics metadata
* remove reference to escalation
(cherry picked from commit e51187a474)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
This commit is contained in:
co-authored by
Brendan O'Handley
parent
0ad8a8fc4f
commit
e62f2a7b74
@@ -134,6 +134,11 @@ async function getMetrics(
|
||||
await datasource.languageProvider.loadMetricsMetadata();
|
||||
}
|
||||
|
||||
// Error handling for when metrics metadata returns as undefined
|
||||
if (!datasource.languageProvider.metricsMetadata) {
|
||||
datasource.languageProvider.metricsMetadata = {};
|
||||
}
|
||||
|
||||
let metrics;
|
||||
if (query.labels.length > 0) {
|
||||
const expr = promQueryModeller.renderLabels(query.labels);
|
||||
|
||||
Reference in New Issue
Block a user