A breathing mask for ventilating a patient, the breathing mask includes a housing covering a respiratory passage of the patient, a first cavity surrounded at least partly by the housing conveying both an inspiratory and expiratory gas, a respiratory port delivering the inspiratory gas from the first cavity and the expiratory gas to the first cavity, and a sampling cell in flow communication with the first cavity, which sampling cell is adapted to convey both the inspiratory gas towards the respiratory port and the expiratory gas from the respiratory port, wherein the sampling cell includes at least one component for enabling a signal acquisition of at least one of the inspiratory and expiratory gas compound.