You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/11/17 05:12:58 UTC

[jira] [Commented] (SLING-5443) Review the naming conventions used by JMXReporter to register the Metric MBeans

    [ https://issues.apache.org/jira/browse/SLING-5443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672760#comment-15672760 ] 

Chetan Mehrotra commented on SLING-5443:
----------------------------------------

Implemented the above approach. The JMX domain is now determined in following way

# Value of {{Sling-Metrics-Domain}} Bundle header if not null
# Else Bundle Symbolic name if not null
# Else use {{org.apache.sling}} as default

Here Bundle is the bundle of the service which creates Metrics instance via {{MetricsService}}

> Review the naming conventions used by JMXReporter to register the Metric MBeans
> -------------------------------------------------------------------------------
>
>                 Key: SLING-5443
>                 URL: https://issues.apache.org/jira/browse/SLING-5443
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: Commons Metrics 1.0.2
>
>
> With current setup the JMXReporter would register all metrics under {{org.apache.sling}} domain. [~pfaffm@adobe.com] suggested that this can cause confusion as metrics registered by non Sling bundle would also show up in Sling JMX domain. 
> We should customize the JMX ObjectName logic to account for bundle which has registered the metrics. One approach that can be used is 
> # Expose the MetricService as a ServiceFactory
> # 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)
> {noformat}
> com.foo = com.foo.*
> org.apache.sling=org.apache.sling.*
> {noformat}
> Discussion thread on mailing list http://markmail.org/thread/sj6yvmyhgze6jn22



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)