modify metrics collection API to be cleaner, in preparation for making it distributed-version compatible