> Could those generating the metrics use the full name, rather than expecting
them to be automatically namespaced.?

Note that this proposal is not for namespacing the metric name. Rather
its for the JMX Domain name under which the MBean is registered.

As for actual Metrics name currently its open to developer and if two
different component try to use the same name then first one would win
and for other an exception would be thrown.
Chetan Mehrotra


On Thu, Jan 21, 2016 at 7:28 PM, Ian Boston <i...@tfd.co.uk> wrote:
> Hi,
> Could those generating the metrics use the full name, rather than expecting
> them to be automatically namespaced.?
> Rather like the way the Logger classes make no assumptions.
> That would be simpler, but perhaps more work for the developer.
> Best Regards
> Ian
>
> On 21 January 2016 at 05:28, Chetan Mehrotra <chetan.mehro...@gmail.com>
> wrote:
>
>> Hi Team,
>>
>> Per current setup all Metrics MBeans are registered under
>> "org.apache.sling" domain. Even metrics registered by non Sling bundle
>> which can lead to confusion.
>>
>> So we would need to come up with a way to make JMX domain name a
>> function of bundle which is registering the metric. For that I was
>> thinking of following approach
>>
>> 1. Expose the MetricService as a ServiceFactory
>>
>> 2. Have an OSGi config which provides a mapping between
>>     Bundle-SymbolicName and JMX Domain name to use. It
>>     would be a regex expression. The metric though MUST be
>>     unique across all metrics (irrespective of which bundle was used)
>>
>>     --------------
>>     com.foo = com.foo.*
>>     org.apache.sling=org.apache.sling.*
>>     --------------
>>
>> Where 'com.foo' is the JMX domain name used for all bundle having
>> there Bundle-Symbolicname confirming to pattern 'com.foo.*'
>>
>> Thoughts and suggestion welcome!
>>
>> Chetan Mehrotra
>>

Reply via email to