Usually it contains the fully qualified domain name. From man hostname
/etc/hostname Historically this file was supposed to only contain the hostname and not the
full canonical FQDN. Nowadays most software is able to cope with a
full FQDN here. This file is read at boot time by the system initialization scripts to set the hostname.
It depends on the application implementations.
We already do it in many app. If some app is missing, we can fix it.
Still is up to the user to correctly setup the names. Also, if an app does too many assumptions, we can try to expose the name parameters directly into the UI.