I am studying Maggiore's book on QFT and I am stuck in the amplitudes of one-loop corrections in QED. Could someone clearly explain me how do I get the following amplitude from the respective diagram?
$$ i\Pi_{\mu\nu}(q) = \int\frac{d^4 k}{(2\pi)^4}Tr\left[(-ie\gamma_\mu)\frac{i(\require{cancel}\cancel k+m)}{k^2-m^2+i\epsilon}(-ie\gamma_\nu)\frac{i(\cancel p-\cancel k+m)}{(p-k)^2-m^2+i\epsilon}\right]. $$
In particular, I don't understand why does not appear the polarization $\varepsilon_\mu(p)$ (and its complex conjugate), since there are photons external legs, and how the trace comes up. I have a similar problem with the fermion self-energy because does not appear any spin wave function either and still there are external fermion legs. So maybe by understanding the photon case I am able to reproduce the fermion's result.