What type of input are you using to receive these messages?
Your configuration doesn’t look like you’re emitting GELF (which would have the capability to set the hostname).
See https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html#xm_gelf for further details.