Maybe you could hook up a mass spectrometer to the purge gas to get real time composition.
Some shale formations in Michigan, for example, sometimes requires drilling to a 4" thick target. You don't know the exact depth because the depth of that 4" thick layer can vary by many feet from an another spot 100m north/south.
I'm aware that if you search "thickness of Antrim shale" or "thickness of Collingswood shale", Google will happily tell you that it's 20-40 feet thick, but for modern drilling techniques, the economics of the well depend on hitting a much more narrow target than that, which can be delicately guided in by analyzing fossils that come up.