From 6108202e56ddf679144cdd0ca0b8c4273f8c8c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Bj=C3=B8rnstad?= Date: Tue, 3 Sep 2024 10:38:01 +0200 Subject: [PATCH] refactor: Update teamUtilizationDataResolver.Team to include environment information --- internal/resourceusage/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/resourceusage/client.go b/internal/resourceusage/client.go index 85ee80ec2..61ad40bab 100644 --- a/internal/resourceusage/client.go +++ b/internal/resourceusage/client.go @@ -167,10 +167,10 @@ func (c *Client) TeamUtilization(ctx context.Context, teamSlug slug.Slug, resour return nil, err } - for _, samples := range used { + for env, samples := range used { for _, sample := range samples { for _, data := range ret { - if data.AppName == string(sample.Metric["container"]) { + if data.AppName == string(sample.Metric["container"]) && data.Env == env { data.Used = float64(sample.Value) } }