  We analyze a family of generalized energy densities in integrable quantum
field theories in the presence of an external field coupled to a conserved
charge. By using the Wiener-Hopf technique to solve the linear thermodynamic
Bethe ansatz equations we derive the full analytic trans-series for these
observables in terms of a perturbatively defined basis. We show how to
calculate these basis elements to high orders analytically and reveal their
complete resurgence structure. We demonstrate that the physical value of the
generalized energy densities is obtained by the median resummation of their
ambiguity-free trans-series.
