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

Multiple metrics collections

    XMLWordPrintable

Details

    Description

      See discussion on https://github.com/wildfly/wildfly/pull/13871

      Do we have MetricsCollector collecting the container metrics multiple times?

      I haven't thought hard about this, but doesn't the Stage.VERIFY collection in MetricsSubsystemAdd end up re-collecting all the deployment=* subtree metrics already collected in Stage.RUNTIME via DeploymentMetricProcessor/DeploymentMetricService? It walks the whole resource tree from the root.

      If the MP Metrics subsystem is installed, isn't MicroProfileMetricsSubsystemAdd and that subsystem's DeploymentMetricProcessor/DeploymentMetricService also collecting the same set of metrics?

      I'm filing this as a Task because maybe all that's needed is to investigate and answer those questions reporting that all is well. But if all isn't well this should converted to a Bug.

      Also, as discussed on PR #13871, https://github.com/wildfly/wildfly/blob/22.0.0.Final/metrics/src/main/java/org/wildfly/extension/metrics/MetricCollector.java#L133-L134 is probably not the best idiom given the code is iterating over runtime-only resources, where the cost of hasChildren can be high.

      Attachments

        Issue Links

          Activity

            People

              jaslee@redhat.com Jason Lee
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: