A fiber Bragg grating has unique characteristics to perform as a sensor. For example, when the fiber is stretched or compressed, the FBG will measure strain. This happens essentially because the deformation of the optical fiber leads to a change in the period of the microstructure and, consequently, of the Bragg wavelength. There is also some contribution from the variation of the index of refraction, through the photoelastic effect.
Sensitivity to temperature is also intrinsic to a Fiber Bragg grating. In this case, the main contributor to Bragg wavelength change is the variation of the silica refraction index, induced by the thermo-optic effect. There is also a contribution from the thermal expansion, which alters the period of the microstructure. This effect is, however, marginal given the low coefficient of thermal expansion of silica.