Skip to content

Instantly share code, notes, and snippets.

@fastnsilver
fastnsilver / SpringIntegrationManagementMetrics.java
Last active October 30, 2020 21:09
Spring Integration Management metrics exposed as Spring Boot Actuator PublicMetrics
public class SpringIntegrationManagementMetrics implements PublicMetrics, ApplicationContextAware {
private ApplicationContext applicationContext;
@Override
public Collection<Metric<?>> metrics() {
Collection<Metric<?>> result = new LinkedHashSet<Metric<?>>();
// Collect Spring Integration metrics; if available
// keys in each map are the bean names