The present invention includes a method and system of measuring
alteration, alteration type, and alteration-causing species in process
fluids and equipment and for controlling the process feeds and conditions
to maximize the yields and equipment lifetime by minimizing the
alteration. The invention includes an optical sensor comprising an
optical fiber, a fiber grating written within the optical fiber,
strain-tuned elements fixed to the optical fiber and an unaltered
element, and an altered element fixed to the unaltered element.