Sunan an-Nasa'i, Book 16, Hadith 6 (In-Book)

It was narrated that Abu Bakrah said: "We were sitting with the Prophet when the sun became eclipsed. He leapt up, dragging his garment and prayed two rak'ahs until the eclipse was over."

أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، وَمُحَمَّدُ بْنُ عَبْدِ الأَعْلَى، قَالاَ حَدَّثَنَا خَالِدٌ، قَالَ حَدَّثَنَا أَشْعَثُ، عَنِ الْحَسَنِ، عَنْ أَبِي بَكْرَةَ، قَالَ كُنَّا جُلُوسًا مَعَ النَّبِيِّ صلى الله عليه وسلم فَكَسَفَتِ الشَّمْسُ فَوَثَبَ يَجُرُّ ثَوْبَهُ فَصَلَّى رَكْعَتَيْنِ حَتَّى انْجَلَتْ ‏‏.‏‏

sunnah.com