The resonance wavelength of whispering gallery modes (WGM) of an optical fiber shifts as a function of the fiber temperature. Monitoring the shift of a given WGM resonance at different positions of a fiber component gives direct information on the thermal effects produced in it. This information is particularly important in fiber power systems. Thermal effects in fiber Bragg gratings are investigated with this technique, measuring the temperature profile generated along the grating as a function of power and wavelength of the optical signal.