[jboss-jira] [JBoss JIRA] (WFLY-11351) Add resource address and attribute name to metric tags

Jeff Mesnil (Jira) issues at jboss.org
Wed Nov 14 09:55:02 EST 2018


Jeff Mesnil created WFLY-11351:
----------------------------------

             Summary: Add resource address and attribute name to metric tags
                 Key: WFLY-11351
                 URL: https://issues.jboss.org/browse/WFLY-11351
             Project: WildFly
          Issue Type: Enhancement
          Components: MP Metrics
            Reporter: Jeff Mesnil
            Assignee: Jason Greene
             Fix For: 15.0.0.CR1


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.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list