Allocating spring metrics only once.