While I was shooting arrows in Medina, the sun became eclipsed. So I gathered my arrows and said to myself, "I will surely observe what the Messenger of Allah ﷺ does during the eclipse of the sun." I came up to him from behind while he was in the mosque, and he began glorifying Allah, magnifying Him, and supplicating until the eclipse cleared. Then he stood and prayed two units with four prostrations.
أخبرنا محمد بن عبد الله بن المبارك قال حدثنا أبو هشام هو المغيرة بن سلمة قال حدثنا وهيب قال حدثنا أبو مسعود الجريري عن حيان بن عمير قال حدثنا
بينا أنا أترامى بأسهم لي بالمدينة إذ انكسفت الشمس فجمعت أسهمي وقلت لأنظرن ما أحدثه رسول الله ﷺ في كسوف الشمس فأتيته مما يلي ظهره وهو في المسجد فجعل يسبح ويكبر ويدعو حتى حسر عنها قال ثم قام فصلى ركعتين وأربع سجدات
Muslim narrated it in the Book of Eclipse, in the chapter on the call to eclipse prayer "the prayer, assemble," hadith no. 913, from the hadith of Jareeri, through him, and it is also in Al-Kubra, hadith no. 1841.