Jeff Mesnil created WFLY-11471:
----------------------------------
Summary: Add expressions to enable statistics
Key: WFLY-11471
URL:
https://issues.jboss.org/browse/WFLY-11471
Project: WildFly
Issue Type: Enhancement
Components: JCA, JMS, MP Metrics, Transactions, Web (Undertow)
Affects Versions: 15.0.0.Final
Reporter: Jeff Mesnil
Assignee: Jeff Mesnil
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:
{code}
statistics-enabled=${wildfly.statistics-enabled:${wildfly.<xxx>.statistics-enabled:false}}
{code}
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
--
This message was sent by Atlassian Jira
(v7.12.1#712002)