Formation of 4-hydroxyproline. Proline is hydroxylated at C-4 by the action of prolyl hydroxylase, an enzyme that activates molecular oxygen.