Skip to content

Commit

Permalink
feat(metrics): add failed task (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
hunshenshi authored Apr 26, 2024
1 parent 7e012f4 commit a09d18d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions task/internal/handler/task_state_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func (h *TaskStateHandler) Handle(s *types.TaskStateLog, t *types.Task) (finishe
return
}
if s.State == types.TaskStateFailed {
metrics.FailedTaskNumMtc(t.ProjectID, t.ProjectVersion)
metrics.TaskFinalStateMtc(t.ProjectID, t.ID, t.ProjectVersion, types.TaskStateFailed.String())
return true
}

Expand Down

0 comments on commit a09d18d

Please sign in to comment.