Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21481

The MP Metrics subsystem should not provide zero-value metrics to smallrye when the metric is unavailable

XMLWordPrintable

      If a vendor metric from the management resource tree is unavailable, the MP Metrics subsystem is reporting zero as its value to smallrye-metrics, which in turn includes that in its response to the user's metrics request. That is incorrect information; the subsystem should throw an IllegalStateException which smallrye will properly handle by not reporting the metric.

      Edited to add further info:

      The particular scenario that would cause a metric to be unavailable is having management RBAC turned on but the caller is not mapped to an RBAC role. The management layer will refuse to provide the metric but the MP Metrics subsystem integration with smallrye-metrics will handle that by passing a value of 0 to smallrye-metrics, which will in turn report the metric name (which is not wanted) and the possibly incorrect 0 value.

      Note that this was only a problem in the xp-3.0.x branch at the time this issue was filed. No EAP or EAP XP release has this problem.

            jaslee@redhat.com Jason Lee
            jaslee@redhat.com Jason Lee
            Fabio Burzigotti Fabio Burzigotti
            Fabio Burzigotti Fabio Burzigotti
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: