Capacitive divider, followed by a diode capacitor series, which measures the peak voltage. The final resistor is used to discharge this peak voltage so that the circuit is ready for next peak. This RC can be tuned according to input signal, so that another peak does not come while measuring the previous one...