private void activate()

in src/main/java/org/apache/sling/commons/metrics/internal/MetricsServiceImpl.java [74:90]


    private void activate(BundleContext context, Map<String, Object> config) {
        enableJMXReporter();

        gaugeManager = new GaugeManager(context, registry, metricsMapper);

        final Dictionary<String, String> svcProps = new Hashtable<>();
        svcProps.put(Constants.SERVICE_DESCRIPTION, "Apache Sling Metrics Service");
        svcProps.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
        regs.add(context.registerService(MetricsService.class.getName(),
                new InternalMetricsServiceFactory(this, metricsMapper), svcProps));

        final Dictionary<String, String> regProps = new Hashtable<>();
        regProps.put(Constants.SERVICE_DESCRIPTION, "Apache Sling Metrics Registry");
        regProps.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
        regProps.put("name", "sling");
        regs.add(context.registerService(MetricRegistry.class.getName(), registry, regProps));
    }