Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11471

Add expressions to enable statistics

    Details

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jmesnil Jeff Mesnil
                  Reporter:
                  jmesnil Jeff Mesnil
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: