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:
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.