From c23177b62d28e962f2a0c5e77509e5220057a2c5 Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Wed, 8 Jan 2025 16:59:27 -0500 Subject: [PATCH] Support metric prefix change --- pkg/ambient/ambient.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/ambient/ambient.go b/pkg/ambient/ambient.go index 878b839..fc22fe4 100644 --- a/pkg/ambient/ambient.go +++ b/pkg/ambient/ambient.go @@ -97,6 +97,9 @@ func (aw *AmbientWeather) handleProviderRequest( // Update metrics if aw.metrics == nil { + if aw.config.MetricPrefix != "" { + weather.MetricPrefix = aw.config.MetricPrefix + } aw.metrics = weather.MustInitMetrics(aw.appCtx) } aw.metrics.Update(update)