class MetricsReportingTask extends AbstractReportingTask {

    @OnScheduled
    public void connect(ConfigurationContext context) {
        if (reporter == null) {
            reporter = ((MetricReporterService) context.getProperty(REPORTER_SERVICE).asControllerService())
                    .createReporter(metricRegistry);
        }
    }

}