Answer :

Electrocardiography (EKG) can be measured both noninvasively with electrocardiogram (and it's the most common, totally safe and painless method), as well as invasively with implantable loop recorder (used in extraordinary circumstances).