Modifications to Spout code to allow for metric registration

Fixes: #445