class TrackingInfoUtils {

    public static JsonObject getMicroservicesInfo(JsonArray microservices) {
        LoggingService.logInfo(MODULE_NAME, "Start getting microservice information");
        JsonObject info = null;
        if(microservices != null){
            info = Json.createObjectBuilder()
                    .add("microservices", microservices)
                    .add("microservicesCount", microservices.size())
                    .build();
        } else {
            LoggingService.logError(MODULE_NAME, "can't get microservices info : option or value must not be null",
                    new AgentSystemException("can't get microservices info : option or value must not be null"));
            info = Json.createObjectBuilder()
                    .add("error", "can't get microservices info : microservices must not be null")
                    .build();
        }
        LoggingService.logInfo(MODULE_NAME, "Finished getting microservice information");
        return info;
    }

}