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

Add resource address and attribute name to metric tags

    XMLWordPrintable

Details

    Description

      WildFly metrics are exposed as Microprofile Metrics with unique names composed of the resource address and the attribute name.

      This can lead to very long unhelpful names. For example, the request-count metric on the /deployment=example.war/subsystem=undertow/servlet=org.example.MyServlet resource is named is registered as `deployment/example.war/subsystem/undertow/servlet/org.example.MyServlet/request-count`.

      When the metric is exported to Prometheus format, it becomes `deployment_example_war_subsystem_undertow_servlet_org_example_my_servlet_request_count` which is a mouthful.

      In order to simply query and aggregation of metrics, the resource address and the attribute name will be stored in the metric tags.
      E.g. for the metric above, its tags will be:

      • subsystem="undertow"
      • deployment="example.war"
      • servlet="org.example.MyServlet"
      • attribute="request-count"

      This makes it much simple for example to aggregate all metrics from a given deployment by looking at metrics with the tag deployment="example.war".

      Note hower that the tags does not preserve the order of the resource address' elements.

      Attachments

        Activity

          People

            jmesnil1@redhat.com Jeff Mesnil
            jmesnil1@redhat.com Jeff Mesnil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: