Measuring the amplitude of a sine wave
What you want is a precision rectifier or peak detector. Here's an example schematic, courtesy Wikipedia:



Effectively, this acts like a diode would, but uses the opamp's feedback in order to eliminate the diode drop. The diode D2 in this circuit is necessary to prevent the opamp from going into saturation when the signal is negative; allowing it to go into saturation causes poor behaviour when the signal crosses back over to positive, as it has to slew across half its range very rapidly.

If you're concerned only about peak measurement, you can easily convert this to a peak detector by adding a capacitor on the output.

Finally, for peak detection, you can simplify this further by using a comparator in place of the opamp, charging the capacitor via a resistor, which allows you to remove one resistor and one diode:







simulate this circuit &ndash; Schematic created using CircuitLab

Comparators do not have the slew rate issues of opamps - removing the need for D2. R1 is necessary to prevent the output overshooting the desired setpoint before the comparator can respond and turn off.