  Massive stars are thought to be progenitors of Long Gamma Ray Bursts (GRBs),
most likely with a bias favouring low metallicity progenitors. Because galaxies
do not have a constant metallicity throughout, the combination of line-of-sight
absorption metallicity inferred from GRB afterglow spectroscopy and of host
galaxy global metallicity derived from emission lines diagnostics represents a
powerful way to probe both the bias function for GRB progenitors, and the
chemical inhomogeneities across star forming regions. In this study, we predict
the relationship between Zabs and Zem using three different hydrodynamical
cosmological simulations: Illustris, EAGLE, and IllustrisTNG. We find that
while the qualitative shape of the curve relating emission versus absorption
metallicity remains the same, the predicted relationship between these two
observables is significantly different between the simulations. Using data for
the host galaxy of GRB121024A for which both Zabs and Zem have been measured,
we find marginal support for the Illustris simulation as producing the
most-realistic internal metallicity distributions within star-forming galaxies
at cosmic noon. Overall, all simulations predict similar properties for the
bulk of the GRB host galaxy population, but each has distinct features in the
tail of the Zabs-Zem distribution that in principle allow to discriminate
between models if a sufficiently large sample of observations are available
(i.e. N>11 on average). Substantial progress is expected in the near future,
with upcoming JWST/NIRspec observations of 10 GRB host galaxies for which
absorption metallicity from the afterglow spectra exists.
