adding ducksboard metric recording

Repull -- like #637, but without the strange commit 5bfb76d32c348, and
without the duplication of 3 functions in 4e94940eb4f09. (This still slows down the tests due to network activity during metrics calls)