We report linear polarization measurements of x rays emitted due to dielectronic recombination into highly charged krypton ions. The ions in the He-like through O-like charge states were populated in an electron beam ion trap with the electron beam energy adjusted to recombination resonances in order to produce $Kalpha$ x rays. The x rays were detected with a newly developed Compton polarimeter using a beryllium scattering target and 12 silicon x-ray detector diodes sampling the azimuthal distribution of the scattered x rays. The extracted degrees of linear polarization of several dielectronic recombination transitions agree with results of relativistic distorted--wave calculations. We also demonstrate a high sensitivity of the polarization to the Breit interaction, which is remarkable for a medium-$Z$ element like krypton. The experimental results can be used for polarization diagnostics of hot astrophysical and laboratory fusion plasmas.