private void addGauge()

in src/main/java/org/apache/sling/commons/threads/impl/DefaultThreadPoolManager.java [452:464]


        private void addGauge(String name, Gauge<?> gauge) {
            final String fullName = getMetricFullName(name);
            final Dictionary<String, String> props = new Hashtable<>();
            props.put(Gauge.NAME, fullName);
            props.put(Constants.SERVICE_DESCRIPTION, "Apache Sling Metrics Gauge - " + fullName);
            props.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");

            try {
                gaugeRegistrations.add(bundleContext.registerService(Gauge.class, gauge, props));
            } catch (IllegalStateException e) {
                logger.warn("Unable to register Metrics Gauge - {}", fullName, e);
            }
        }