From 04c8b067c7b487965ac165537a40107219a8d87c Mon Sep 17 00:00:00 2001 From: Assaf Admi Date: Thu, 16 May 2024 20:59:56 +0300 Subject: [PATCH] metrics name linter: Remove timestamp_seconds suffix restriction Signed-off-by: assafad --- test/metrics/prom-metrics-linter/custom_linter_rules.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/metrics/prom-metrics-linter/custom_linter_rules.go b/test/metrics/prom-metrics-linter/custom_linter_rules.go index b023dd32..96b99e24 100644 --- a/test/metrics/prom-metrics-linter/custom_linter_rules.go +++ b/test/metrics/prom-metrics-linter/custom_linter_rules.go @@ -43,14 +43,6 @@ func CustomLinterRules(problems []promlint.Problem, mf *dto.MetricFamily, operat }) } - // Check "_timestamp_seconds" suffix for non-counter metrics - if *mf.Type != dto.MetricType_COUNTER && strings.HasSuffix(*mf.Name, "_timestamp_seconds") { - problems = append(problems, promlint.Problem{ - Metric: *mf.Name, - Text: "non-counter metric should not have \"_timestamp_seconds\" suffix", - }) - } - // If promlint fails on a "total" suffix, check also for "_timestamp_seconds" suffix. If it exists, do not fail var newProblems []promlint.Problem for _, problem := range problems {