This should not really be here, it should be done as part of the deployment. e.g. think about that happens if this method is called multiple times.

Also for consistency it should be setMetricsCollector()