(cherry picked from commit c9a3b2d420)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
This commit is contained in:
co-authored by
Brendan O'Handley
parent
b7864b3db1
commit
e326041c82
@@ -18,6 +18,7 @@ import { PrometheusDatasource } from './datasource';
|
|||||||
import {
|
import {
|
||||||
addLimitInfo,
|
addLimitInfo,
|
||||||
extractLabelMatchers,
|
extractLabelMatchers,
|
||||||
|
fixSummariesMetadata,
|
||||||
parseSelector,
|
parseSelector,
|
||||||
processHistogramMetrics,
|
processHistogramMetrics,
|
||||||
processLabels,
|
processLabels,
|
||||||
@@ -145,19 +146,9 @@ export default class PromQlLanguageProvider extends LanguageProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async loadMetricsMetadata() {
|
async loadMetricsMetadata() {
|
||||||
// The metadata endpoint is experimental and
|
this.metricsMetadata = fixSummariesMetadata(
|
||||||
// we have customers who are not implementing it.
|
await this.request('/api/v1/metadata', {}, {}, { showErrorAlert: false })
|
||||||
// This is to be a temporary fix until the Observability Metrics Squad
|
);
|
||||||
// has time to implement the 2022Q3 plan
|
|
||||||
// to detect prometheus versions and implementations.
|
|
||||||
// This will allow us to see if endpoints such as api/v1/metadata
|
|
||||||
// are implemented or not and handle them as such
|
|
||||||
this.metricsMetadata = {};
|
|
||||||
|
|
||||||
// PREVIOUS IMPLEMENTATION FOR NOTES
|
|
||||||
// this.metricsMetadata = fixSummariesMetadata(
|
|
||||||
// await this.request('/api/v1/metadata', {}, {}, { showErrorAlert: false })
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLabelKeys(): string[] {
|
getLabelKeys(): string[] {
|
||||||
|
|||||||
Reference in New Issue
Block a user