Volcanic gases were collected and analysed as long ago as 1790 by Scipione Breislak in Italy.  The composition of volcanic gases is dependent on the movement of magma within the volcano. Therefore, sudden changes in gas composition often presage a change in volcanic activity. Accordingly, a large part of hazard monitoring of volcanoes involves regular measurement of gaseous emissions. For example, an increase in the CO content of gases at Stromboli has been ascribed to injection of fresh volatile-rich magma at depth within the system. 
Volcanic gases can be sensed (measured in-situ) or sampled for further analysis. Volcanic gas sensing can be:
* within the gas by means of electrochemical sensors and flow-through infrared-spectroscopic gas cells
* outside the gas by ground-based or airborne remote spectroscopy e.g., Correlation spectroscopy (COSPEC), Differential Optical Absorption Spectroscopy (DOAS), or Fourier Transform Infrared Spectroscopy (FTIR).
Sulphur dioxide (SO) absorbs strongly in the ultraviolet wavelengths and has low background concentrations in the atmosphere. These characteristics make sulphur dioxide a good target for volcanic gas monitoring. It can be detected by satellite-based instruments, which allow for global monitoring, and by ground-based instruments such as DOAS. DOAS arrays are placed near some well-monitored volcanoes and used to estimate the flux of SO emitted. The Multi-Component Gas Analyzer System (Multi-GAS) is also used to remotely measure CO, SO and HS. The fluxes of other gases are usually estimated by measuring the ratios of different gases within the volcanic plume, e.g. by FTIR, electrochemical sensors at the volcano crater rim, or direct sampling, and multiplying the ratio of the gas of interest to SO by the SO flux.
Direct sampling of volcanic gas sampling is often done by a method involving an evacuated flask with caustic solution, first used by Robert W. Bunsen (1811-1899) and later refined by the German chemist Werner F. Giggenbach (1937-1997), dubbed Giggenbach-bottle. Other methods include collection in evacuated empty containers, in flow-through glass tubes, in gas wash bottles (cryogenic scrubbers), on impregnated filter packs and on solid adsorbent tubes.
Analytical techniques for gas samples comprise gas chromatography with thermal conductivity detection (TCD), flame ionization detection (FID) and mass spectrometry (GC-MS) for gases, and various wet chemical techniques for dissolved species (e.g., acidimetric titration for dissolved CO, and ion chromatography for sulfate, chloride, fluoride). The trace metal, trace organic and isotopic composition is usually determined by different mass spectrometric methods.