code: public final void addHostTag(final boolean canonical) {
      try {
        if (canonical) {
          addExtraTag("fqdn", InetAddress.getLocalHost().getCanonicalHostName());
        } else {
          addExtraTag("host", InetAddress.getLocalHost().getHostName());
        }
      } catch (UnknownHostException x) {
        LOG.error("WTF?  Can't find hostname for localhost!", x);
        addExtraTag("host", "(unknown)");
      }
    }
docs: Adds a {@code host=hostname} or {@code fqdn=full.host.name} tag.
  <p>
  This uses {@link InetAddress#getLocalHost} to find the hostname of the
  current host.  If the hostname cannot be looked up, {@code (unknown)}
  is used instead.
  @param canonical Whether or not we should try to get the FQDN of the host.
  If set to true, the tag changes to "fqdn" instead of "host"