azure-spring-boot/src/main/java/com/microsoft/azure/spring/support/UserAgent.java
public static String getUserAgent(String serviceName, boolean allowTelemetry) {
        String macAddress = "Not Collected";
        if (allowTelemetry) {
            macAddress = GetHashMac.getHashMac();
        }

        return String.format(serviceName + " MacAddressHash:%s", macAddress);
    }
public static String getUserAgent(String serviceName, boolean allowTelemetry) {
        String macAddress = "Not Collected";
        if (allowTelemetry) {
            macAddress = GetHashMac.getHashMac();
        }

        return String.format(serviceName + " MacAddressHash:%s", macAddress);
    }
Generate UserAgent string for given service.

@param serviceName    Name of the service from which called this method.
@param allowTelemetry Whether allows telemtry
@return generated UserAgent string