Skip to content

Commit 60714cb

Browse files
committed
improve doc a bit
1 parent 66a98f4 commit 60714cb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

instrumentation/jmx-metrics/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,13 @@ rules:
373373

374374
### Aggregation over multiple MBean instances
375375

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.
377377

378378
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.
380380

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.
383383

384384
```yaml
385385
- 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.
391391
desc: JVM GC execution count
392392
```
393393

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+
394399
### General Syntax
395400

396401
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

Comments
 (0)