We report an all-optical radio-frequency (RF) spectrum analyzer with a bandwidth greater than 5 terahertz (THz), based on a 50-cm long spiral waveguide in a CMOS-compatible high-index doped silica platform. By carefully mapping out the dispersion profile of the waveguides for different thicknesses, we identify the optimal design to achieve near zero dispersion in the C-band. To demonstrate the capability of the RF spectrum analyzer, we measure the optical output of a femtosecond fiber laser with an ultrafast optical RF spectrum in the terahertz regime.