move a metric from constructor to its caller to avoid racing condition