Online monitoring of an additive manufacturing environment using a time-of-flight mass spectrometer