General help with using metric definitions with a plugin

How would I accomplish this? would I have to name my metric the same as what they do for it to grab or is there another way of using it?