You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,13 +373,13 @@ rules:
373
373
374
374
### Aggregation over multiple MBean instances
375
375
376
-
Sometimes, multiple MBean instances are registered with distinct names and we need to capture the aggregate value of all the instances.
376
+
Sometimes, multiple MBean instances are registered with distinct names and we need to capture the aggregate value over all the instances.
377
377
378
378
For example, the JVM exposes the number of GC executions in the `CollectionCount` attribute of the MBean instances returned by `java.lang:name=*,type=GarbageCollector` query,
379
-
there are multiple instances each with a distinct value for the `name` key.
379
+
there are multiple instances each with a distinct value for the `name` parameter.
380
380
381
-
In order to capture the total number of GC executions across all those instances in a single metric, we can use the following configuration
382
-
where the `name` key in the MBean name is NOT mapped to a metric attribute.
381
+
To capture the total number of GC executions across all those instances in a single metric, we can use the following configuration
382
+
where the `name` parameter in the MBean name is NOT mapped to a metric attribute.
383
383
384
384
```yaml
385
385
- bean: java.lang:name=*,type=GarbageCollector
@@ -391,6 +391,11 @@ where the `name` key in the MBean name is NOT mapped to a metric attribute.
391
391
desc: JVM GC execution count
392
392
```
393
393
394
+
When two or more MBean parameters are used, it is also possible to perform a partial aggregation:
395
+
- parameters not mapped as metric attributes are discarded
396
+
- parameters mapped as metric attributes with `param(<mbeanParam>)` are preserved
397
+
- values are aggregated with mapped metric attributes
398
+
394
399
### General Syntax
395
400
396
401
Here is the general description of the accepted configuration file syntax. The whole contents of the file is case-sensitive, with exception for `type` as described in the table below.
0 commit comments