I've been looking into energy monitoring (240VAC mains) lately and I've come across seemingly conflicting info. On the one hand, a lot of advice I've seen online stress the importance of galvanic isolation between the HV section and the MCU/logical section of the circuit, for the safety of the circuit and its designer as well. This is usually done with a low-rated transformer to reduce mains to some more manageable voltage below 12 V, for instance.
On the other hand, I've looked up a number of energy-metering ICs (like the ADE and STPM series) and all the app notes I've examined so far (such as this PDF), show circuits where the IC analog front-end is connected directly to mains live (albeit through some heavy attenuation) and the neutral is directly connected to the AGND, which in turn is linked to the DGND of the control section (sometimes through an inductor to dampen transients apparently). No galvanic isolation whatsoever.
So is all this stuff really contradictory or am I missing something? What's the 'right' way to take these measurements?