<p>A contactless sensor is designed with a metal housing (2) and a substantially ceramic sensor unit (4), which is at least partially arranged in the housing (2) and which has an integrated measuring element. The housing (2) and the sensor unit (4) have different thermal expansion coefficients. The sensor is characterized in that at least one compensation element (3) is provided between the housing (2) and the sensor unit (4), the at least one compensation element having at least one material property that compensates for the different expansion coefficients.</p>