Musnad Ahmad 1216
It was narrated from `Ali (رضي الله عنه) that The sun was eclipsed, and `Ali (رضي الله عنه) led the people in prayer. He recited Ya-Seen or something similar, then he bowed for as long as a soorah, then he raised his head and said:
Allah hears the one who praises Him. Then he stood for as long as the soorah, calling upon Allah and magnifying Him. Then he bowed again, for as long as his recitation. Then he said: Allah hears the one who praises him, and he stood up again for as long as the Soorah. Then he bowed for a similar length of time again, until he had bowed four times. Then he said: Allah hears the one who praises Him. Then he prostrated. Then he stood up for the second rak`ah, in which he did the same as he had done in the first rak`ah. Then he sat, calling upon Allah and beseeching Him, until the eclipse ended, then he told them that this is what the Messenger of Allah (ﷺ) did.
حَدَّثَنَا يَحْيَى بْنُ آدَمَ، حَدَّثَنَا زُهَيْرٌ، حَدَّثَنَا الْحَسَنُ بْنُ الْحُرِّ، حَدَّثَنَا الْحَكَمُ بْنُ عُتَيْبَةَ، عَنْ رَجُلٍ، يُدْعَى حَنَشًا عَنْ عَلِيٍّ، رَضِيَ اللَّهُ عَنْهُ قَالَ كَسَفَتْ الشَّمْسُ فَصَلَّى عَلِيٌّ رَضِيَ اللَّهُ عَنْهُ لِلنَّاسِ فَقَرَأَ يس أَوْ نَحْوَهَا ثُمَّ رَكَعَ نَحْوًا مِنْ قَدْرِ السُّورَةِ ثُمَّ رَفَعَ رَأْسَهُ فَقَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ثُمَّ قَامَ قَدْرَ السُّورَةِ يَدْعُو وَيُكَبِّرُ ثُمَّ رَكَعَ قَدْرَ قِرَاءَتِهِ أَيْضًا ثُمَّ قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ثُمَّ قَامَ أَيْضًا قَدْرَ السُّورَةِ ثُمَّ رَكَعَ قَدْرَ ذَلِكَ أَيْضًا حَتَّى صَلَّى أَرْبَعَ رَكَعَاتٍ ثُمَّ قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ثُمَّ سَجَدَ ثُمَّ قَامَ فِي الرَّكْعَةِ الثَّانِيَةِ فَفَعَلَ كَفِعْلِهِ فِي الرَّكْعَةِ الْأُولَى ثُمَّ جَلَسَ يَدْعُو وَيَرْغَبُ حَتَّى انْكَشَفَتْ الشَّمْسُ ثُمَّ حَدَّثَهُمْ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَذَلِكَ فَعَلَ‏.‏