class DefaultLookoutClient extends AbstractLookoutClient {

    @Override
    public synchronized void addRegistry(MetricRegistry registry) {
        if (registry == null) {
            return;
        }
        if (isAutoRegisterExtendedMetrics) {
            registry.registerExtendedMetrics();
        }
        super.addRegistry(registry);

        if (registry instanceof LookoutRegistry) {
            MetricConfig config = ((LookoutRegistry) registry).getConfig();
            if (!config.containsKey(APP_NAME)) {
                //HttpObserver needs
                config.setProperty(APP_NAME, getAppName());
            }
            if (!config.getBoolean(LOOKOUT_EXPORTER_ENABLE, false)) {
                return;
            }
            try {
                setMetricsHttpExporter(PollerUtils.exportHttp((LookoutRegistry) registry));
            } catch (Exception e) {
                logger.error("fail to start MetricsHttpExporter", e);
            }
        }
    }

    public  DefaultLookoutClient(String appName);

}