From f649291d42590b29ab8f3006e768c7029b95bd8a Mon Sep 17 00:00:00 2001 From: Jeremy PLANCKEEL Date: Tue, 9 Aug 2022 16:52:56 +0200 Subject: [PATCH] refacto: rename metrics --- README.md | 6 +++--- pkg/exporter/exporter.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 78556d8..02becd2 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ spec: metrics: - type: External external: - metricName: "prescale_metric" + metricName: "prescaling_metric" metricSelector: matchLabels: deployment: "{{ .Release.Name }}" @@ -70,12 +70,12 @@ Here is a configuration example using the prometheus adapter to supply the metri ``` - "metricsQuery": "avg(<<.Series>>{<<.LabelMatchers>>})" "name": - "as": "prescale_metric" + "as": "prescaling_metric" "resources": "overrides": "namespace": "resource": "namespace" - "seriesQuery": "prescale_metric" + "seriesQuery": "prescaling_metric" ``` ## Configure parameters diff --git a/pkg/exporter/exporter.go b/pkg/exporter/exporter.go index 646757c..f331210 100644 --- a/pkg/exporter/exporter.go +++ b/pkg/exporter/exporter.go @@ -17,12 +17,12 @@ type prescalingCollector struct { func NewPrescalingCollector(p prescaling.IPrescaling) prometheus.Collector { return &prescalingCollector{ prescaleMetrics: prometheus.NewDesc( - "prescale_metric", + "prescaling_metric", "Number used for prescale application", []string{"project", "deployment", "namespace"}, nil, ), minMetrics: prometheus.NewDesc( - "min_replica", + "prescaling_min_replica", "Number of pod desired for prescale", []string{"project", "deployment", "namespace"}, nil,