The format is like this.
{
"tags":
{
"metric":"thread_pool",
"name":"thrift-server-pool",
"type":"active_thread_num"
},
"unit":"number",
"value":3
}
I will add a new JsonMetricVisitor to handle the convertion.
It's not to modify existing PrometheusMetricVisitor and SimpleCoreMetricVisitor.
Also I add a unit item to indicate the metric better.
public enum MetricUnit {
NANOSECONDS,
MICROSECONDS,
MILLISECONDS,
SECONDS,
BYTES,
ROWS,
NUMBER,
PERCENT,
NOUNIT
};