From 712b474226b1c46d7168be82641b16742e355d66 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 8 Aug 2022 18:50:41 -0400 Subject: [PATCH] Prometheus: Remove metadata endpoint (#53428) (#53433) * remove prom metadata endpoint until we have a fix for detecting versions and implementations * fix linting issue (cherry picked from commit 7aeb8b4cdf0447d22f7936390f9946dadd4fb77d) Co-authored-by: Brendan O'Handley --- .../datasource/prometheus/language_provider.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/language_provider.ts b/public/app/plugins/datasource/prometheus/language_provider.ts index e88827e7cf7..fc8d14e0d10 100644 --- a/public/app/plugins/datasource/prometheus/language_provider.ts +++ b/public/app/plugins/datasource/prometheus/language_provider.ts @@ -18,7 +18,6 @@ import { PrometheusDatasource } from './datasource'; import { addLimitInfo, extractLabelMatchers, - fixSummariesMetadata, parseSelector, processHistogramMetrics, processLabels, @@ -146,9 +145,19 @@ export default class PromQlLanguageProvider extends LanguageProvider { }; async loadMetricsMetadata() { - this.metricsMetadata = fixSummariesMetadata( - await this.request('/api/v1/metadata', {}, {}, { showErrorAlert: false }) - ); + // The metadata endpoint is experimental and + // we have customers who are not implementing it. + // 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[] {