Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1898

MP metrics: "displayName" and "description" parameters of the @Counted annotation are ignored

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2018.3.3
    • Fix Version/s: 2018.4.1
    • Component/s: microprofile
    • Labels:
      None

      Description

      As part of a Swarm application, I have a simple application metric such as

      @ApplicationScoped
      public class HelloService {
          @Counted(monotonic = true, name = "hello", absolute = true, displayName = "HELLO", description = "Number of hello invocations")
          public String hello() {
              return "Hello from counted method";
          }
      }
      

      When I run that -swarm.jar uberjar, trigger the metered method (this is so that the metric is registered, see SWARM-1897) and then issue an OPTIONS request to localhost:8080/metrics, I don't see the displayName and description:

      {
          "application": {
              "hello": {
                  "displayName": "hello", 
                  "type": "counter", 
                  "unit": "none"
              }
          }, 
          "base": {
              ...
          }
      }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mszynkie Michal Szynkiewicz
                Reporter:
                lthon Ladislav Thon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: