用法见下
https://github.com/prometheus/client_java#instrumenting
counter只能简单逐个递增,gauge可自由变化
labelnames为label的name,比如"category"、"fruit_type"
对应使用counter和gauge的时候,labels为具体label,比如"clothes"、"apple"
static final Counter requests = Counter.build()
.name("my_counter").help("Total counts.")
.labelNames("category", "fruit_type" ).register();
requests.labels("food", "apple").inc();
gauge可以用
Gauge.Timer timer = opentsdbWriteTime.labels("some_label").startTimer();
timer.setDuration;
度量时间长度,单位秒