-
Enhancement
-
Resolution: Done
-
Major
-
15.0.0.Final
-
None
With the microprofile-metrics-smallrye extension, we can expose WildFly metrics to monitoring tools such as Promotheus.
However, some of these metrics can have performance/memory impact and are not computed by default. They are control by attributes named `statistics-enabled` on the WildFly resources those runtime provides these metrics.
If an user wants to collect such metrics, he has to set these `statistics-enabled` attributes to `true` for all resources.
In order to improve user experience, our shipped standalone configuration could use expressions so that the user would have to set a single system property to enable these metrics.
The format would be:
statistics-enabled=${wildfly.statistics-enabled:${wildfly.<xxx>.statistics-enabled:false}}
where <xxx> are names of the resources that exposes the metrics: undertow, transactions, datasources, messaging-activemq
The nested expressions allows to have a global system property to enable all statistics: (wildfly.statistics-enabled) and specific system properties to enable/disable only some metrics (e.g. wildfly.transactions.statistics-enabled).
Use case:
- start the standalone profile as usual
- ./bin/standalone.sh
- => all statistics-enabled attributes are resolved to false
- start the standalone profile with all statistics:
- ./bin/standalone.sh -Dwildfly.statistics-enabled=true
- => all statistics-enabled attributes are resolved to true
- start the standalone profile with only undertow statistics:
- ./bin/standalone.sh -Dwildfly.undertow.statistics-enabled=true
- => all statistics-enabled attributes are resolved to true
- start the standalone profile with only undertow statistics:
- ./bin/standalone.sh -Dwildfly.undertow.statistics-enabled=true
- => only undertow statistics are enabled
- start the standalone profile with all but undertow statistics:
- ./bin/standalone.sh -Dwildfly.undertow.statistics-enabled=false -Dwildfly.statistics-enabled=true
- => All but undertow statistics are enabled
- is duplicated by
-
WFLY-11420 Configure statistics-enabled for subsystems that exposes metrics
- Closed
- is related to
-
WFLY-11644 Add expressions to enable statistics - EJB and WS
- Closed