private Map<Tags, Long> collectAggregatedCounts() {
		return instanceRegistry.getApplications()
			.getRegisteredApplications()
			.stream()
			.flatMap(application -> application.getInstances().stream())
			.collect(Collectors.groupingBy(tagProvider::eurekaInstanceTags, Collectors.counting()));
	}
{@link SmartApplicationListener} for collecting event metrics from
{@link PeerAwareInstanceRegistry}.

@author Wonchul Heo
@author Olga Maciaszek-Sharma
@since 4.1.2
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/metrics/EurekaInstanceMonitor.java