There are a number of analog optoisolators that will work for you. The Vishay (nee Infineon) IL300 is an old standard.

It is normally used in a circuit such as this:

Because a single LED illuminates two photodiodes, the LED drift can be largely compensated by the closed loop feedback circuit.
Note that you require a power supply on the high voltage side, so you may require an appropriate DC-DC converter.
More accuracy is possible from more recently developed similar parts such as the HCNR201.
As others have said, there are a number of other galvanic isolation technologies, digital and analog (your signal could be digitized on the hot side, so there is some percentage in considering digital methods). Magnetic (analog and digital) and differential capacitor coupling are a couple of common ones. Some are modules that have an isolated power supply incorporated. Of course, price escalates rapidly as such features are added.