[1.0.0] Sling metrics one bundle works other does not register?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1.0.0] Sling metrics one bundle works other does not register?

nino martinez wael
HI

I have a wierd problem. I've been using Sling metrics with great success in
one of my bundles.

Today I wanted to expand my usage to my frontend bundle. AND not matter
what I do none of my api calls register at all..

The metric service are discovered as it should but this line below, never
impacts the sling metrics frontend listing:

getMetricsService().counter("Webadmin.renderings").increment();


What could be wrong? No exceptions are thrown..


--
Best regards / Med venlig hilsen
Nino Martinez
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1.0.0] Sling metrics one bundle works other does not register?

nino martinez wael
No one has just a small clue?

On Fri, Mar 17, 2017 at 11:34 PM, nino martinez wael <
[hidden email]> wrote:

> HI
>
> I have a wierd problem. I've been using Sling metrics with great success
> in one of my bundles.
>
> Today I wanted to expand my usage to my frontend bundle. AND not matter
> what I do none of my api calls register at all..
>
> The metric service are discovered as it should but this line below, never
> impacts the sling metrics frontend listing:
>
> getMetricsService().counter("Webadmin.renderings").increment();
>
>
> What could be wrong? No exceptions are thrown..
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>



--
Best regards / Med venlig hilsen
Nino Martinez
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1.0.0] Sling metrics one bundle works other does not register?

Ian Boston-4
Hi,
Did nothing turn up in the Sling Console for Metrics ?

Each MetricsRegistry service should be dumped there, prefixed by its name.
There is a MetricsRegistry for Oak and one for Sling. I think if the
SlingMetrics bundle fails to start the service that wrappes the dropwizard
metrics classes you might get a dummy metrics service that does nothing. I
would check what services there are present implementing the MetricsService
and which components hold references to them.

There is code here [1] that collects all the Metrics Registries for
reporting purposes. You might be able adapt that to debug the problem.

HTH
Best Regards
Ian

1
https://github.com/ieb/influxdb-reporter-osgi/blob/master/src/main/java/org/apache/sling/influxdb/CodehaleMetricsReporterComponent.java#L101

On 22 March 2017 at 15:17, nino martinez wael <[hidden email]>
wrote:

> No one has just a small clue?
>
> On Fri, Mar 17, 2017 at 11:34 PM, nino martinez wael <
> [hidden email]> wrote:
>
> > HI
> >
> > I have a wierd problem. I've been using Sling metrics with great success
> > in one of my bundles.
> >
> > Today I wanted to expand my usage to my frontend bundle. AND not matter
> > what I do none of my api calls register at all..
> >
> > The metric service are discovered as it should but this line below, never
> > impacts the sling metrics frontend listing:
> >
> > getMetricsService().counter("Webadmin.renderings").increment();
> >
> >
> > What could be wrong? No exceptions are thrown..
> >
> >
> > --
> > Best regards / Med venlig hilsen
> > Nino Martinez
> >
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1.0.0] Sling metrics one bundle works other does not register?

Bertrand Delacretaz
In reply to this post by nino martinez wael
On Fri, Mar 17, 2017 at 11:34 PM, nino martinez wael
<[hidden email]> wrote:
> ...The metric service are discovered as it should but this line below, never
> impacts the sling metrics frontend listing:
> getMetricsService().counter("Webadmin.renderings").increment(); ..

Did you restart your Sling instance since installing the bundle that
has that code?

I don't have a precise diagnostic so far but I've seen instances where
updating a bundle to a version that includes metrics does nothing
until Sling is restarted.

-Bertrand
Loading...