}
//logs.addAll(current.getLogRecords());
}
Snapshot combined = new Snapshot.Builder()
.activeSessions(activeSessions)
.committedTX(committedTX)
.currentThreadBusy(currentThreadBusy)
.expiredSessions(expiredSessions)
.peakThreadCount(peakThreadCount)
.queuedConnections(queuedConnections)
.rolledBackTX(rolledBackTX)
.threadCount(threadCount)
.totalErrors(totalErrors)
.usedHeapSize(usedHeapSize)
.instanceName(COMBINED_SNAPSHOT_NAME)
.logs(new ArrayList<>(logs))
.build();
combined.setApps(new ArrayList(applications.values()));
combined.setPools(new ArrayList(pools.values()));
return combined;
}