metrics: add worker error metrics
This commit introduces the collection of error metrics since it is now possible to differentiate between internal errors and user input errors. Additionally, the error status is reported for job duration metrics.
This commit is contained in:
parent
6c4caec022
commit
290472dfdf
3 changed files with 50 additions and 4 deletions
|
|
@ -486,7 +486,8 @@ func (s *Server) FinishJob(token uuid.UUID, result json.RawMessage) error {
|
|||
if err != nil {
|
||||
logrus.Errorf("error finding job status: %v", err)
|
||||
} else {
|
||||
prometheus.FinishJobMetrics(status.Started, status.Finished, status.Canceled, jobType)
|
||||
statusCode := clienterrors.GetStatusCode(jobResult.JobError)
|
||||
prometheus.FinishJobMetrics(status.Started, status.Finished, status.Canceled, jobType, statusCode)
|
||||
}
|
||||
|
||||
// Move artifacts from the temporary location to the final job
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue