The sun was eclipsed during the time of the Messenger of Allah ﷺ, and that occurred on the day his son Ibrahim died. The people said, "It was eclipsed because of the death of his son Ibrahim ﷺ." So the Prophet ﷺ stood and led the people in prayer, performing six bowings within four prostrations.He said the opening takbir, then recited at length, then bowed for about as long as he had stood. Then he raised his head and recited, but less than the first recitation. Then he bowed for about as long as he had stood. Then he raised his head and recited a third recitation, less than the second. Then he bowed for about as long as he had stood. Then he raised his head and went down for prostration, performing two prostrations.Then he stood and performed three bowings before prostrating, each bowing being longer than the one that followed it, with each bowing roughly equal in length to his standing. Then he moved back during his prayer, and the rows moved back with him. Then he moved forward and stood in his place, and the rows moved forward. He completed the prayer, and by then the sun had become bright again.He said, "People, the sun and the moon are two of the signs of Allah . They do not eclipse for the death of any human being. So when you see anything of that, pray until it clears."And he continued the rest of the hadith.
حدثنا أحمد بن حنبل حدثنا يحيى عن عبد الملك حدثني عطاء
كسفت الشمس على عهد رسول الله ﷺ وكان ذلك في اليوم الذي مات فيه إبراهيم بن رسول الله ﷺ فقال الناس إنما كسفت لموت إبراهيم ابنه ﷺ فقام النبي ﷺ فصلى بالناس ست ركعات في أربع سجدات كبر ثم قرأ فأطال القراءة ثم ركع نحوا مما قام ثم رفع رأسه فقرأ دون القراءة الأولى ثم ركع نحوا مما قام ثم رفع رأسه فقرأ القراءة الثالثة دون القراءة الثانية ثم ركع نحوا مما قام ثم رفع رأسه فانحدر للسجود فسجد سجدتين ثم قام فركع ثلاث ركعات قبل أن يسجد ليس فيها ركعة إلا التي قبلها أطول من التي بعدها إلا أن ركوعه نحو من قيامه قال ثم تأخر في صلاته فتأخرت الصفوف معه ثم تقدم فقام في مقامه وتقدمت الصفوف فقضى الصلاة وقد طلعت الشمس فقال يا أيها الناس إن الشمس والقمر آيتان من آيات الله عز وجل لا ينكسفان لموت بشر فإذا رأيتم شيئا من ذلك فصلوا حتى تنجلي وساق بقية الحديث
Muslim narrated it in the Book of the Eclipse, in the chapter on what was shown to the Prophet ﷺ concerning Paradise and Hell during the eclipse prayer, hadith no. 904, from the hadith of Abdul-Malik bin Abu Sulayman, through his chain, and it is also found in full in Musnad Ahmad, 3/317, 318.