Add metric flusher to export remaining metrics on shutdown
Before this change the app context closes and metrics that have not
yet been exported ccan be orphaned. The design of this feature is simple:
use Closeable where possible, so that it will be called automatically
by Spring on shutdown.
Fixes gh-5771
@ -42,6 +46,8 @@ public class MetricExporters implements SchedulingConfigurer {
@@ -42,6 +46,8 @@ public class MetricExporters implements SchedulingConfigurer {
@ -78,6 +84,7 @@ public class MetricExporters implements SchedulingConfigurer {
@@ -78,6 +84,7 @@ public class MetricExporters implements SchedulingConfigurer {
@ -99,6 +106,16 @@ public class MetricExporters implements SchedulingConfigurer {
@@ -99,6 +106,16 @@ public class MetricExporters implements SchedulingConfigurer {