You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2016/08/31 08:26:55 UTC

Adding metrics to the Sling core?

Hi,

Shall we generally add metrics [1] to our core?

I have a student at $work that needs to do a small project, I thought
they could contribute to that, including creating a demo setup with
some visualization tool.

We'd need to define guidelines for which metrics to add where but
that's a good thing anyway.

WDYT?

-Bertrand

[1] https://sling.apache.org/documentation/bundles/metrics.html

Re: Adding metrics to the Sling core?

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Wed, Aug 31, 2016 at 2:58 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Is the activation of that NOOP implementation configurable, or should
> we make it configurable?

That would need to be implemented

Chetan Mehrotra

Re: Adding metrics to the Sling core?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Aug 31, 2016 at 11:16 AM, Chetan Mehrotra
<ch...@gmail.com> wrote:
> On Wed, Aug 31, 2016 at 2:40 PM, Bertrand Delacretaz
> <bd...@apache.org> wrote:
>> ...this shows the need for our core to optionally work with
>> metrics disabled
>
> Thats possible with Sling Metrics where it can register a NOOP
> implementation...

Is the activation of that NOOP implementation configurable, or should
we make it configurable?

-Bertrand

Re: Adding metrics to the Sling core?

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Wed, Aug 31, 2016 at 2:40 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Good point, this shows the need for our core to optionally work with
> metrics disabled

Thats possible with Sling Metrics where it can register a NOOP
implementation without requiring api clients to do any change. So we
can safely add instrumentation to core part of Sling

Chetan Mehrotra

Re: Adding metrics to the Sling core?

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

On Wed, Aug 31, 2016 at 10:49 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> ...I am not certain how Metrics 3.1 behaves when run on a non Sun JDK...

Good point, this shows the need for our core to optionally work with
metrics disabled, for the worst case where such implementations are
not compatible with one's environment.

-Bertrand

Re: Adding metrics to the Sling core?

Posted by Ian Boston <ie...@tfd.co.uk>.
+1

The underlying impl which is IIRC Codehale metrics used sun.misc.Unsafe pre
3.2 fixed in [1]. It should be updated once 3.2 is updated. I am not
certain how Metrics 3.1 behaves when run on a non Sun JDK. I think it falls
back to a slower impl of Stripe64 that doesn't use Unsafe internally.

I don't think this should block adding metrics and instrumenting operations
with timers/counters etc.

As more metrics are added, I think care needs to be taken to ensure the
reporting mechanisms don't become resource hogs. IIRC some reporters (eg
JMX, Console) can become expensive with 1000s of metrics. Ganglia, JSON, ES
etc reporters are all fine with large numbers of metrics.

Best Regards
Ian

1 https://github.com/dropwizard/metrics/issues/539

On 31 August 2016 at 09:33, Chetan Mehrotra <ch...@gmail.com>
wrote:

> +1. This would be useful
>
> Some ideas on what metrics need to be collected at mentioned in SLING-5410.
> Chetan Mehrotra
>
>
> On Wed, Aug 31, 2016 at 1:56 PM, Bertrand Delacretaz
> <bd...@apache.org> wrote:
> > Hi,
> >
> > Shall we generally add metrics [1] to our core?
> >
> > I have a student at $work that needs to do a small project, I thought
> > they could contribute to that, including creating a demo setup with
> > some visualization tool.
> >
> > We'd need to define guidelines for which metrics to add where but
> > that's a good thing anyway.
> >
> > WDYT?
> >
> > -Bertrand
> >
> > [1] https://sling.apache.org/documentation/bundles/metrics.html
>

Re: Adding metrics to the Sling core?

Posted by Chetan Mehrotra <ch...@gmail.com>.
+1. This would be useful

Some ideas on what metrics need to be collected at mentioned in SLING-5410.
Chetan Mehrotra


On Wed, Aug 31, 2016 at 1:56 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> Shall we generally add metrics [1] to our core?
>
> I have a student at $work that needs to do a small project, I thought
> they could contribute to that, including creating a demo setup with
> some visualization tool.
>
> We'd need to define guidelines for which metrics to add where but
> that's a good thing anyway.
>
> WDYT?
>
> -Bertrand
>
> [1] https://sling.apache.org/documentation/bundles/metrics.html