Adding short hostname label in PromQL
Short hostname takes up less space and allows to supply more information in metric legend. Example below will create an additional label short_hostname.
label_replace(your_metric, "short_hostname", "$1", "hostname", "([^.]*).*")