public static String getAddressFirst(InetSocketAddress inetSocketAddress) {
        if (inetSocketAddress == null) {
            return null;
        }
        InetAddress inetAddress = inetSocketAddress.getAddress();
        if (inetAddress != null) {
            return inetAddress.getHostAddress();
        }
        // This won't trigger a DNS lookup as if it got to here, the hostName should not be null on the basis
        // that InetSocketAddress does not allow both address and hostName fields to be null.
        return inetSocketAddress.getHostName();
    }
Returns the String form of the IP address of the given {@link InetSocketAddress}, or the hostname
if it has not been resolved. Returns {@code null} if neither can be retrieved.

<p>This <b>does not</b> trigger a DNS lookup if the address has not been resolved yet by simply
returning the hostname.

@param inetSocketAddress the socket address in which to retrieve the address from
@return  the String representation of the address or the hostname, or {@code null} if neither
         can be found.

@see InetSocketAddress#isUnresolved()
agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/plugin/util/SocketAddressUtils.java