The determination of the amount of dipeptidyl peptidase 2 in a sample. The trait is dipeptidyl peptidase 2 measurement (EFO_0020326).