  We study the two-point function of local operators in the critical O(N) model
in the presence of a magnetic field localized on a line. We use a recently
developed conformal dispersion relation to compute the correlator at first
order in the $\epsilon$-expansion and we extract the full set of defect and
bulk CFT data using the Lorentzian inversion formulae. The only input for the
computation of the connected correlator is its discontinuity at first order in
perturbation theory, which is determined by the anomalous dimension of a single
bulk operator. We discuss possible low-spin ambiguities and perform several
diagrammatic checks of our results.
