From 7bce0a2cadb3775329fdc00540be725a15241672 Mon Sep 17 00:00:00 2001 From: Manik Rana Date: Fri, 4 Oct 2024 19:48:27 +0530 Subject: [PATCH] chore: imports Signed-off-by: Manik Rana --- model/textparse/openmetricsparse.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/model/textparse/openmetricsparse.go b/model/textparse/openmetricsparse.go index 042542bcd95..ab6eb0f35e5 100644 --- a/model/textparse/openmetricsparse.go +++ b/model/textparse/openmetricsparse.go @@ -350,20 +350,6 @@ func (p *OpenMetricsParser) resetCTParseValues(resetLexer *openMetricsLexer) { p.skipCTSeries = true } -// findBaseMetricName returns the metric name without reserved suffixes such as "_created", -// "_sum", etc. based on the OpenMetrics specification found at -// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md. -// If no suffix is found, the original name is returned. -func findBaseMetricName(name string) string { - suffixes := []string{"_created", "_count", "_sum", "_bucket", "_total", "_gcount", "_gsum", "_info"} - for _, suffix := range suffixes { - if strings.HasSuffix(name, suffix) { - return strings.TrimSuffix(name, suffix) - } - } - return name -} - // typeRequiresCT returns true if the metric type requires a _created timestamp. func typeRequiresCT(t model.MetricType) bool { switch t {