Limit collect-metrics hook to fire only on charms that have metrics declared.