diff --git a/main.go b/main.go index 937f768..0e46c7e 100644 --- a/main.go +++ b/main.go @@ -11,8 +11,9 @@ import ( ) type telemetry struct { - slug string `json:"slug"` - eventType string `json:"type"` + slug string `json:"slug"` + eventType string `json:"type"` + qualityChangeUp string `json:"isUp"` } type metrics struct { @@ -71,7 +72,7 @@ func telemetryHandler(m metrics) echo.HandlerFunc { case type_recovery: m.recovery.WithLabelValues(v.slug).Inc() case type_quality_switch: - if v.slug == "up" { + if v.qualityChangeUp == "up" { m.qualityUp.WithLabelValues(v.slug).Inc() } else { m.qualityDown.WithLabelValues(v.slug).Inc()