Skip to content

Commit

Permalink
fix!: salt_responses_total was not including scheduled job return
Browse files Browse the repository at this point in the history
  • Loading branch information
kpetremann committed Jul 8, 2023
1 parent 111de67 commit da87638
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func eventToMetrics(event event.SaltEvent, r Registry) {
}
r.IncreaseScheduledJobReturnTotal(event.Data.Fun, state, event.Data.Id, success)
} else {
r.IncreaseResponseTotal(event.Data.Id, success) // TODO: move outside the if?
r.IncreaseFunctionResponsesTotal(event.Data.Fun, state, event.Data.Id, success)
}

r.IncreaseResponseTotal(event.Data.Id, success)
r.SetFunctionStatus(event.Data.Id, event.Data.Fun, state, success)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/metrics/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func NewRegistry(config Config) Registry {
responseTotal: promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "salt_responses_total",
Help: "Total number of response job processed",
Help: "Total number of response job processed, including scheduled job",
},
[]string{"minion", "success"},
),
Expand Down

0 comments on commit da87638

Please sign in to comment.