Optical near-field technologies such as solid immersion lenses and hyperlenses are candidate solutions for high resolution and high throughput wafer inspection and metrology for the next technology nodes. Besides sub-diffraction limited optical performance, these concepts share the necessity of extreme proximity to the sample at distances that are measured in tens of nanometers. For the instrument this poses two major challenges: 1) how to measure the distance to the sample? and 2) how to position accurately and at high speed? For the first challenge near-field thermal radiation is proposed as a mechanism for an integrated distance sensor (patent pending). This sensor is realized by making a sensitive calorimeter (accuracy of 2:31nW root sum squared). When used for distance measurement an equivalent uncertainty of 1nm can be achieved for distances smaller than 100 nm. By scanning the distance sensor over the sample, thermal profilometry is realized, which can be used to inspect surfaces in a non-intrusive and non-contact way. This reduces wear of the probe and minimizes the likelihood of damaging the sample.