A photoluminescence microprobe technique with less-than-or-equal-to 0.2-degrees-C and < 5-mu-m resolution is demonstrated for measuring lateral temperature profiles in GaAs-based optoelectronic devices. The technique is used to measure the junction-heating induced temperature gradient in both single-stripe and broad-area diode lasers. The effective focal length of the thermally induced refractive index gradient lens is determined from the temperature gradient in a broad-area device.