From a88f8c2dc5a5c2e7bd71db1c3cbace38eb7f321e Mon Sep 17 00:00:00 2001 From: Frederico Santos Date: Wed, 6 Nov 2024 00:32:50 +0000 Subject: [PATCH] fix: Correct formIndex formatting in session metrics processing --- api/savedata/update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/savedata/update.go b/api/savedata/update.go index efd1785..a1c2c65 100644 --- a/api/savedata/update.go +++ b/api/savedata/update.go @@ -96,7 +96,7 @@ func ProcessSessionMetrics(save defs.SessionSaveData, username string) { formIndex := "" if formIdx, ok := partyMember["formIndex"].(float64); ok && formIdx != 0 { - formIndex = fmt.Sprintf("%d", int(formIdx)) + formIndex = fmt.Sprintf("-%d", int(formIdx)) } speciesFloat, ok := partyMember["species"].(float64) @@ -106,7 +106,7 @@ func ProcessSessionMetrics(save defs.SessionSaveData, username string) { } species := int(speciesFloat) - key := fmt.Sprintf("%d-%s", species, formIndex) + key := fmt.Sprintf("%d%s", species, formIndex) party += key + "," starterCounter.WithLabelValues(key).Inc() }