Reputation: 619
Currently, when I create a JMX Metric and I register it, the metric's namespace seems to be generated as:
TYPE.METRIC-NAME.CLASS-NAME.ID
So, a counter metric called "numberOfVisitors" in the class VisitorMetric, registered as VistitorServlet looks like:
COUNTER.numberOfVisitors.VisitorMetrics.VistitorServlet
Ideally, I want it named like:
ID.METRIC-NAME
VistitorServlet.numberOfVisitors
Even if I could reverse it would be better.
Upvotes: 1
Views: 142
Reputation: 619
After some playing around, I figured out a work around:
I created a new tag using the config builder with the key "class" this creates a metric called:
COUNTER.[METRIC-NAME].[CLASS-NAME].value
You can also override the COUNTER in the bean name by creating a new Class - unfortunately, Netflix made the concrete Counter classes final, so you can't just extend and override some functionality of the class.
Upvotes: 1