It sounds like there is some interest in this, it seems general enough, and with Robert willing to maintain it I think it could have a place in Felix.
I'll follow-up with a VOTE today. regards, Karl On Tue, Apr 28, 2020 at 8:05 AM Georg Henzler <[email protected]> wrote: > > Hi all, > > +1 for adding this Felix. > > Although related with health checks I agree metrics are a bit of a > separate topic and the dependency from the current module to the > HC API is minimal (currently only on "string service name level" [1], > in the future probably using a more explicit @Reference) > > Looking at the current API in package org.apache.sling.metrics.osgi > it seems like it's very much focused on startup only - this is a good > starting point but from an outside point of view you would expect > the metrics to be continuously updated (e.g. a Meter for service > restarts instead of only registering the Gauge after startup is > completed). It should be configurable to the need of a particular > setup. > > Also, after "FELIX-6250 Introduce HealthCheckMonitor ..." has been > implemented, one plan was also to optionally expose health check > results as metrics (all, some or none depending on config). > Ideally this piece would also be in the felix metrics bundle (that > already has a dependency to io.dropwizard.metrics). > > -Georg > > [1] > https://github.com/apache/sling-whiteboard/blob/0f6b6fb68294aa252f88c7cd0c3c2b94b3bcfa1a/osgi-metrics/collector/src/main/java/org/apache/sling/metrics/osgi/impl/StartupTimeCalculator.java#L67 > > > On 2020-04-23 15:19, Robert Munteanu wrote: > > I'm getting a bit off-topic here, sorry :-) > > > > It would actually be quite simple: > > > > 1. Install and configure SystemReady/HC > > > > 2. Install > > https://github.com/apache/sling-whiteboard/tree/master/osgi-metrics/collector > > > > 3. Create an Decanter appender (event-drive I guess) that implements > > the StartupMetricsListener interface. > > > > Whenever the startup metrics are completed, the onStartupComplete > > method is invoked. > > > > Thanks, > > Robert > > > > On Thu, 2020-04-23 at 15:12 +0200, Jean-Baptiste Onofre wrote: > >> Definitely I agree with you. I would love to create a new collector > >> in Decanter ;) > >> > >> Regards > >> JB > >> > >> > Le 23 avr. 2020 à 15:10, Robert Munteanu <[email protected]> a > >> > écrit : > >> > > >> > Hi JB, > >> > > >> > On Tue, 2020-04-21 at 16:21 +0200, Jean-Baptiste Onofre wrote: > >> > > Hi, > >> > > > >> > > Healthcheck can be a place. > >> > > >> > This indeed related to the HealthCheck module. It only consumes the > >> > API, so I would say this should not necessarily be bundled/included > >> > in > >> > the HC. > >> > > >> > > Karaf Decanter can be another option as well. > >> > > >> > Reading on the Decanter, I can see that it's a monitoring solution. > >> > I > >> > think there is a link here, as these metrics I'm gathering can be > >> > wrapped as a Decanter collector and then the output pushed through > >> > any > >> > kind of appender. > >> > > >> > I would still prefer to make this solution generic, as I'm not > >> > currently using Decanter. > >> > > >> > Thanks, > >> > Robert > >> > > >> > > Regards > >> > > JB > >> > > > >> > > > Le 21 avr. 2020 à 14:25, Robert Munteanu <[email protected]> a > >> > > > écrit : > >> > > > > >> > > > Hi, > >> > > > > >> > > > I have been working on collecting startup metrics for OSGi > >> > > > applications. I am interested in finding potentials for > >> > > > optimising > >> > > > startup time, so created a set of bundles that record: > >> > > > > >> > > > - total startup time > >> > > > - bundles that are slow to start > >> > > > - OSGi services that are restarted during startup > >> > > > > >> > > > I think the functionality would be useful for the wider > >> > > > community > >> > > > and > >> > > > would like to ask whether the Felix project would be interested > >> > > > in > >> > > > hosting it. > >> > > > > >> > > > The 'project' consists of two bundles: > >> > > > > >> > > > - one that starts as early as possible and collects startup > >> > > > metrics > >> > > > - one that contains some out-of-the-box consumers of metrics > >> > > > - Dropwizard metrics > >> > > > - slf4j logging > >> > > > - JSON output to disk > >> > > > > >> > > > The bundles are in the Apache Sling whiteboard for now [1], so > >> > > > no > >> > > > releases were cut, no documentation to change, no backwards > >> > > > compatibility to consider. > >> > > > > >> > > > Do you think this functionality has its place in Felix? I would > >> > > > be > >> > > > happy to contribute it, if the community agrees. > >> > > > > >> > > > Thanks, > >> > > > Robert > >> > > > > >> > > > > >> > > > [1]: > >> > > > https://github.com/apache/sling-whiteboard/tree/master/osgi-metrics > >> > > > -- Karl Pauls [email protected]
