Support metric prefix change
Some checks failed
Build and Publish / release (push) Failing after 40s

This commit is contained in:
Ryan McGuire 2025-01-08 16:59:27 -05:00
parent 86653cf589
commit c23177b62d

View File

@ -97,6 +97,9 @@ func (aw *AmbientWeather) handleProviderRequest(
// Update metrics // Update metrics
if aw.metrics == nil { if aw.metrics == nil {
if aw.config.MetricPrefix != "" {
weather.MetricPrefix = aw.config.MetricPrefix
}
aw.metrics = weather.MustInitMetrics(aw.appCtx) aw.metrics = weather.MustInitMetrics(aw.appCtx)
} }
aw.metrics.Update(update) aw.metrics.Update(update)