class StraceDiagnosticManager {

	public void updateMonitoringMicroservices(JsonObject diagnosticData) {
		LoggingService.logDebug(MODULE_NAME, "Trying to update strace monitoring microservices");

		if (diagnosticData !=null && diagnosticData.containsKey("straceValues")) {
			JsonArray straceMicroserviceChanges = diagnosticData.getJsonArray("straceValues");
			if(straceMicroserviceChanges != null){
				for (JsonValue microserviceValue : straceMicroserviceChanges) {
					JsonObject microservice = (JsonObject) microserviceValue;
					if (microservice.containsKey("microserviceUuid")) {
						String microserviceUuid = microservice.getString("microserviceUuid");
						boolean strace = microservice.getBoolean("straceRun");
						manageMicroservice(microserviceUuid, strace);
					}
				}
			}
		}
		LoggingService.logDebug(MODULE_NAME, "Finished update strace monitoring microservices");
	}

	private  StraceDiagnosticManager();

}