From 2c29493229e5a27d87196198291511b3e24f5841 Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Tue, 28 Jan 2025 15:47:58 -0500 Subject: [PATCH] Upgrade, fix attrs --- go.mod | 2 +- go.sum | 2 ++ pkg/weather/metrics.go | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 05dce4d..87f27b6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module gitea.libretechconsulting.com/rmcguire/ambient-weather-local-exporter go 1.23.4 require ( - gitea.libretechconsulting.com/rmcguire/go-app v0.4.1 + gitea.libretechconsulting.com/rmcguire/go-app v0.4.2 github.com/go-resty/resty/v2 v2.16.5 github.com/gorilla/schema v1.4.1 github.com/rs/zerolog v1.33.0 diff --git a/go.sum b/go.sum index 91e1454..3d4a75f 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ gitea.libretechconsulting.com/rmcguire/go-app v0.4.0 h1:iEGuA2D15rniiKlgejykxvs0 gitea.libretechconsulting.com/rmcguire/go-app v0.4.0/go.mod h1:ug6g+FyEi2LguWTQfd+bZrTd1ECsot8BylxgMFEO5DM= gitea.libretechconsulting.com/rmcguire/go-app v0.4.1 h1:gjDg2M/j1AdMCtkXqQnLCo6jJUSWQOj56ehfU1S6BGE= gitea.libretechconsulting.com/rmcguire/go-app v0.4.1/go.mod h1:9c71S+sJb2NqvOwt3CFsW5WjE895goiRlMTdLimgwHs= +gitea.libretechconsulting.com/rmcguire/go-app v0.4.2 h1:LQxVLXEHruY32GaMsS5K/tMdjS5kvw6reUh25gshn40= +gitea.libretechconsulting.com/rmcguire/go-app v0.4.2/go.mod h1:9c71S+sJb2NqvOwt3CFsW5WjE895goiRlMTdLimgwHs= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA= diff --git a/pkg/weather/metrics.go b/pkg/weather/metrics.go index d1c4b61..3f1992e 100644 --- a/pkg/weather/metrics.go +++ b/pkg/weather/metrics.go @@ -114,6 +114,8 @@ func MustInitMetrics(appCtx context.Context) *WeatherMetrics { func (wm *WeatherMetrics) Update(u *WeatherUpdate) { attributes := []attribute.KeyValue{ semconv.ServiceVersion(wm.cfg.Version), + semconv.ServiceName(wm.cfg.Name), + semconv.DeploymentEnvironment(wm.cfg.Environment), } if u.StationType != nil { attributes = append(attributes,