diff --git a/task/internal/handler/task_state_handler.go b/task/internal/handler/task_state_handler.go index 10289731..3cd0c4a9 100644 --- a/task/internal/handler/task_state_handler.go +++ b/task/internal/handler/task_state_handler.go @@ -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 }