A method of detecting an analyte in a fluid includes the step of positioning a sensor probe in the fluid. The sensor probe includes a sensing element which absorbs in the infrared region of the spectrum in response to the analyte. The change is then detected with a detection system.