On Thu, Jan 19, 2017 at 2:48 PM, Ian Boston <ianbos...@gmail.com> wrote:
>
> Is the intention that [1] should use the same approach as [2] so that there
> is 1 MetricsRegistry per JVM ?

No. Sling Metrics creates and manages its own MetricRegistry and
registers it in OSGi with a "name" service property set to "sling".
The one in Oak also dose registers its managed MetricRegistry and
registers it with "name=oak" service property.

The webconsole  plugin accounts for  multiple registry instance.

> ie Check for a MetricsRegistry as a service, and if not present create one, 
> so that there is only 1 which reporters can report on.

The reporter implemented so far [1] and [2] account for that and can
work with multiple MetricRegistry present in OSGi service registry

Chetan Mehrotra
[1] 
https://github.com/apache/sling/blob/trunk/bundles/commons/metrics/src/main/java/org/apache/sling/commons/metrics/internal/MetricWebConsolePlugin.java#L431
[2] 
https://github.com/bdelacretaz/sling-adaptto-2016/blob/master/sling-images/bundles/metrics-es-reporter/src/main/java/ch/x42/sling/at16/internal/MetricCopyingListener.java#L36

Reply via email to