You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Antonio Sanso <as...@adobe.com> on 2015/08/26 09:44:21 UTC

add JMX MBean for Sling Servlet Filter

hi *,

few days ago I opened [0] that is about adding JMX MBean for Sling Servlet Filter.
Now this is a fairly easy task. Before to dig into it though it would be nice to have some feedback of which are the statistic we should incorporate.
At the moment we also have a console plugin that looks like

Current Apache Sling Servlet Filter Configuration

Request Filters:
0 : class org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter (id: 150, property: none); called: 14; time: 0ms; time/call: 0µs
0 : class org.apache.sling.launchpad.testservices.filters.SlingFilter (id: 298, property: none); called: 14; time: 1ms; time/call: 71µs
0 : class org.apache.sling.launchpad.testservices.filters.NoPropertyFilter (id: 319, property: none); called: 14; time: 0ms; time/call: 0µs
0 : class org.apache.sling.launchpad.testservices.filters.SlingFilterWithPattern (id: 320, property: none); called: 6; time: 1ms; time/call: 166µs
-700 : class org.apache.sling.i18n.impl.I18NFilter (id: 160, property: service.ranking=-700); called: 14; time: 0ms; time/call: 0µs

Error Filters:
-700 : class org.apache.sling.i18n.impl.I18NFilter (id: 160, property: service.ranking=-700); called: 2; time: 0ms; time/call: 0µs

Include Filters:

Forward Filters:

Component Filters:
This would be too much for a JMX MBean right :)?

WDYT?

regards

antonio

[0] https://issues.apache.org/jira/browse/SLING-4958

Re: add JMX MBean for Sling Servlet Filter

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Wed, Sep 2, 2015 at 5:49 PM, Antonio Sanso <as...@adobe.com> wrote:
> ...Chatiting with a colleague (thanks Francesco!!), he pointed out that probably
> would be more useful to have one MBean per filter....

If the number of filters makes it reasonably easy to find the right
one in a JMX console, why not.

-Bertrand

Re: add JMX MBean for Sling Servlet Filter

Posted by Antonio Sanso <as...@adobe.com>.
little follow up.

Chatiting with a colleague (thanks Francesco!!), he pointed out that probably would be more useful to have one MBean per filter. And any MBean would have info as


  *   service = org.apache.sling.i18n.impl.I18NFilter

Attributes
Attribute Name  Attribute Value
InvocationsCount        2268
MaxRequestDurationMsec  1000
MinRequestDurationMsec  0
MeanRequestDurationMsec 122.67692307692307
StandardDeviationDurationMsec   134.5240577569106


I think is a great idea!! WDYT?

regards

antonio

On Aug 26, 2015, at 3:29 PM, Antonio Sanso <as...@adobe.com>> wrote:

nice one and  thanks Bertrand .

Really appreciated your feedback!

regards

antonio

On Aug 26, 2015, at 10:34 AM, Bertrand Delacretaz <bd...@apache.org>> wrote:

On Wed, Aug 26, 2015 at 9:25 AM, Antonio Sanso <as...@adobe.com>> wrote:
On Aug 26, 2015, at 9:55 AM, Bertrand Delacretaz <bd...@apache.org>> wrote:
...typically JMX statistics are much more concise than the one we provided in the console....

I think the following info (provided in a structured way in JMX) is
all good to have:

0 : class org.apache.sling.launchpad.testservices.filters.SlingFilter
(id: 298, property: none); called: 14; time: 1ms; time/call: 71µs

Min/max timings might also be useful to have.

And if you represent that as a tree of filters organized in categories
that would be convenient IMO, I don't think that's too much
information.

-Bertrand



Re: add JMX MBean for Sling Servlet Filter

Posted by Antonio Sanso <as...@adobe.com>.
nice one and  thanks Bertrand .

Really appreciated your feedback!

regards

antonio 

On Aug 26, 2015, at 10:34 AM, Bertrand Delacretaz <bd...@apache.org> wrote:

> On Wed, Aug 26, 2015 at 9:25 AM, Antonio Sanso <as...@adobe.com> wrote:
>> On Aug 26, 2015, at 9:55 AM, Bertrand Delacretaz <bd...@apache.org> wrote:
>> ...typically JMX statistics are much more concise than the one we provided in the console....
> 
> I think the following info (provided in a structured way in JMX) is
> all good to have:
> 
> 0 : class org.apache.sling.launchpad.testservices.filters.SlingFilter
> (id: 298, property: none); called: 14; time: 1ms; time/call: 71µs
> 
> Min/max timings might also be useful to have.
> 
> And if you represent that as a tree of filters organized in categories
> that would be convenient IMO, I don't think that's too much
> information.
> 
> -Bertrand


Re: add JMX MBean for Sling Servlet Filter

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Aug 26, 2015 at 9:25 AM, Antonio Sanso <as...@adobe.com> wrote:
> On Aug 26, 2015, at 9:55 AM, Bertrand Delacretaz <bd...@apache.org> wrote:
> ...typically JMX statistics are much more concise than the one we provided in the console....

I think the following info (provided in a structured way in JMX) is
all good to have:

0 : class org.apache.sling.launchpad.testservices.filters.SlingFilter
(id: 298, property: none); called: 14; time: 1ms; time/call: 71µs

Min/max timings might also be useful to have.

And if you represent that as a tree of filters organized in categories
that would be convenient IMO, I don't think that's too much
information.

-Bertrand

Re: add JMX MBean for Sling Servlet Filter

Posted by Antonio Sanso <as...@adobe.com>.
On Aug 26, 2015, at 9:55 AM, Bertrand Delacretaz <bd...@apache.org> wrote:

> Hi,
> 
> On Wed, Aug 26, 2015 at 8:44 AM, Antonio Sanso <as...@adobe.com> wrote:
>> ...it would be nice to have some feedback of which are the statistic
>> we should incorporate....
> 
> Would it make sense to consider the JMX Bean and webconsole plugin as
> just two views on the same data?

that it was i had in mind.
But typically JMX statistics are much more concise than the one we provided in the console.

unless I am wrong :)

regards

antonio
> That would make things simpler in
> terms of documentation, for example.
> 
> -Bertrand


Re: add JMX MBean for Sling Servlet Filter

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Wed, Aug 26, 2015 at 8:44 AM, Antonio Sanso <as...@adobe.com> wrote:
> ...it would be nice to have some feedback of which are the statistic
> we should incorporate....

Would it make sense to consider the JMX Bean and webconsole plugin as
just two views on the same data? That would make things simpler in
terms of documentation, for example.

-Bertrand