The determination of the amount of mesothelin in a sample. The trait is mesothelin measurement (Experimental Factor Ontology entry EFO_0020565).