Most textbooks solve the Klein-Gordon equation with the ansatz
$$\varphi(\mathbf{x},t) = \int \frac{\mathrm{d}^3\mathbf{k}}{f(k)}\left(a(\mathbf{k})\, \mathrm{e}^{i k x} + b(\mathbf{k})\,\mathrm{e}^{-i k x} \right)$$
so that they can then choose $f$ so that the integration measure is lorentz-invariant and canonically quantize $a$ and $b$.
But why is it that we do not instead consider the more natural-looking solution $$\varphi(x) = \int \mathrm{d}^4k \, \left(a(k) \, \mathrm{e}^{i k x} + b(k) \, \mathrm{e}^{-i k x}\right)?$$
Is this not a greater set of solutions than the ones expressed at top? I guess this form makes it easier to write down the Hamiltonian (which isn't Lorentz-invariant, like the integrand sans measure of the top equation) but it seems really weird to write down the solution of a Lorentz-invariant equation of motion as a sum over non-Lorentz-invariant solutions and then rescue it with the integration measure.