Collect metrics hook

This branch limits the add-metric tool to add metrics on when running in the collect-metrics hook. The scope where metrics can be added will most likely change later on.

The collect-metrics hooks is not executed yet - this will be done in a follow-up PR.