feat:enable stat reporting as default.

pull/862/head
Haotian Zhang 3 years ago
parent 99be5eb0a7
commit ccc4d5efcb

@ -131,8 +131,13 @@ public class PolarisServiceRegistry implements ServiceRegistry<PolarisRegistrati
try { try {
StatReporter statReporter = (StatReporter) polarisDiscoveryHandler.getSdkContext().getPlugins() StatReporter statReporter = (StatReporter) polarisDiscoveryHandler.getSdkContext().getPlugins()
.getPlugin(PluginTypes.STAT_REPORTER.getBaseType(), StatReporterConfig.DEFAULT_REPORTER_PROMETHEUS); .getPlugin(PluginTypes.STAT_REPORTER.getBaseType(), StatReporterConfig.DEFAULT_REPORTER_PROMETHEUS);
if (Objects.nonNull(statReporter)) {
LOGGER.info("Stat server started on port: " + statReporter.metaInfo().getPort() + " (http)"); LOGGER.info("Stat server started on port: " + statReporter.metaInfo().getPort() + " (http)");
} }
else {
LOGGER.warn("Plugin StatReporter not found");
}
}
catch (Exception e) { catch (Exception e) {
LOGGER.warn("Stat server started error, ", e); LOGGER.warn("Stat server started error, ", e);
} }

Loading…
Cancel
Save