You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2020/04/21 12:02:43 UTC

[sling-whiteboard] branch master updated: osgi-metrics: update README

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new c0540c5  osgi-metrics: update README
c0540c5 is described below

commit c0540c594888292a7bc0fd16632fb5f76c4d1996
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Apr 21 14:02:23 2020 +0200

    osgi-metrics: update README
---
 osgi-metrics/README.md | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/osgi-metrics/README.md b/osgi-metrics/README.md
index 24e2b0f..3310dc9 100644
--- a/osgi-metrics/README.md
+++ b/osgi-metrics/README.md
@@ -9,16 +9,26 @@ The module is split into two bundles:
 - _collector_ - a zero-dependencies bundle that uses the OSGi APIs to gather various metrics
 - _consumers_ - a single bundle that contains various consumers
 
-The collector bundle dependes on a `org.apache.felix.systemready.SystemReady` service to detect
-application startup. This service is provided by the [Apache Felix SystemReady](https://github.com/apache/felix-dev/blob/master/systemready/docs/README.md)
-bundle.
+## Metric collection
+
+The metrics are collected by the `org.apache.sling.metrics.osgi.collector` bundle. This bundle requires no configuration and imports a minimal set of packages, to allow starting as early as possible.
+
+As soon as startup is completed the metrics are made available to consumers that implement the `StartupMetricsListener` interface. The metrics are published after an optional delay, to prevent on-off bounces in startup completion.
+
+Startup completion is delegated to either the `org.apache.felix.systemready` or the `org.apache.felix.healtchecks.api` bundles, which publish marker services once the system is considered ready.
+
+## Metric publication
+
+The `org.apache.sling.metrics.osgi.consumers` bundle contains three out-of-the-box implementation for publishing the metrics
+
+- DropWizard metrics using a `MetricRegistry`
+- JSON file written in the bundle data directory
+- Log entries using the SLF4j API
 
 ## Usage
 
 1. Add the `org.apache.sling/org.apache.sling.metrics.osgi.collector` bundle and ensure that
    it starts as early as possible
-1. Add the `org.apache.felix/org.apache.felix.systemready` bundle and its dependencies, and
-   configure it as desired
-1. Add the `org.apache.sling/org.apache.sling.metrics.osgi.consumers` bundle. After the application
-   startup is detected with reasonable confidence, the consumers will react. At least a logging
-   statement should be printed in the log
+1. Add the `org.apache.sling/org.apache.sling.metrics.osgi.consumers` bundle.
+1. Add the required bundles, either Apache Felix SystemReady or Apache Felix Health Checks
+1. Start up the application