In the field of trace gas measurement, with the characteristics of high sensitivity, high selectivity and rapid detection, tunable diode laser absorption spectroscopy (TDLAS) is widely used in industrial process and trace gas pollution monitoring. Herriott cell is a common form of multiple reflections of the sample cell, the structure of the Herriott cell is relatively simple, which be used to application of trace gas absorption spectroscopy. In the pragmatic situation, the gas components are complicated, and the continuous testing process for a long time can lead to different degree of pollution and corrosion for the reflector in the sample cell. If the mirror is not cleaned up in time, it will have a great influence on the detection accuracy. In order to solve this problem in the process of harsh environment detection, this paper presents a design of the built-in sample cell to avoid the contact of gas and the mirror, thereby effectively reducing corrosion pollution. If there is optical pollution, direct replacement of the built-in optical sample cell can easily to be disassembled, and cleaned. The advantage of this design is long optical path, high precision, cost savings and so on.