Make metric group example compile

Also add the example as a standalone file under examples/.