Skip to content

Commit

Permalink
Fix: new success always false
Browse files Browse the repository at this point in the history
A new posted job don't have any success value. It should be considered
as always true, as if the exporter sees it from the event queue, it
means the job has been successfully posted.
  • Loading branch information
kpetremann committed Oct 15, 2022
1 parent 0ca32a9 commit 8d73875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func ExposeMetrics(ctx context.Context, eventChan chan events.SaltEvent) {
switch event.Type {
case "new":
state := event.ExtractState()
newJobCounter.WithLabelValues(event.Data.Fun, state, strconv.FormatBool(event.Data.Success)).Inc()
newJobCounter.WithLabelValues(event.Data.Fun, state, "true").Inc()
expectedResponsesNumber.WithLabelValues(event.Data.Fun, state).Add(float64(event.TargetNumber))
case "ret":
state := event.ExtractState()
Expand Down

0 comments on commit 8d73875

Please sign in to comment.