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:07:04 UTC
[sling-whiteboard] branch master updated: osgi-metrics: expand
README with example
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 c616f5c osgi-metrics: expand README with example
c616f5c is described below
commit c616f5c162916fc128f044e8406505baff26ff03
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Apr 21 14:06:44 2020 +0200
osgi-metrics: expand README with example
---
osgi-metrics/README.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/osgi-metrics/README.md b/osgi-metrics/README.md
index 3310dc9..a226b51 100644
--- a/osgi-metrics/README.md
+++ b/osgi-metrics/README.md
@@ -25,6 +25,44 @@ The `org.apache.sling.metrics.osgi.consumers` bundle contains three out-of-the-b
- JSON file written in the bundle data directory
- Log entries using the SLF4j API
+### JSON metrics file sample
+
+The following (truncated) JSON file exemplifies how the metrics are written
+
+```
+{
+ "application": {
+ "startTimeMillis": 1587469534671,
+ "startDurationMillis": 14635
+ },
+ "bundles": [
+ {
+ "symbolicName": "org.osgi.util.pushstream",
+ "startTimeMillis": 1587469535933,
+ "startDurationMillis": 0
+ },
+ {
+ "symbolicName": "org.apache.aries.util",
+ "startTimeMillis": 1587469535935,
+ "startDurationMillis": 0
+ },
+ {
+ "symbolicName": "org.apache.felix.configadmin",
+ "startTimeMillis": 1587469536313,
+ "startDurationMillis": 58
+ }
+ ],
+ "services": [
+ {
+ "identifier": "jmx.objectname=org.apache.sling.classloader:name=FSClassLoader,type=ClassLoader",
+ "restarts": 2
+ }
+ ]
+}
+```
+
+Similar metrics are reported through the other collectors.
+
## Usage
1. Add the `org.apache.sling/org.apache.sling.metrics.osgi.collector` bundle and ensure that