We study boundary traces of shift-invariant diffusions: two-dimensional diffusions in the upper half-plane R × [0, ∞) (or in R × [0, R)) invariant under horizontal translations. We prove that the corresponding trace processes are Lévy processes with completely monotone jumps, and, conversely, every Lévy process with completely monotone jumps is a boundary trace of some shift-invariant diffusion. Up to some natural transformations of space and time, this correspondence is bijective. We also reformulate this result in the language of additive functionals of the Brownian motion in [0, ∞) (or in [0, R)), and Brownian excursions. Our main tool is the recent extension of Krein's spectral theory of strings, due to Eckhardt and Kostenko.