use of com.navercorp.pinpoint.profiler.monitor.metric.custom.IntGaugeMetricVo in project pinpoint by naver.
the class GrpcCustomMetricMessageConverter method createIntGaugeMetric.
private PCustomMetric createIntGaugeMetric(String metricName, CustomMetricVo[] customMetricVos) {
PIntGaugeMetric.Builder intGaugeMetricBuilder = PIntGaugeMetric.newBuilder();
intGaugeMetricBuilder.setName(metricName);
for (CustomMetricVo customMetricVo : customMetricVos) {
if (customMetricVo instanceof IntGaugeMetricVo) {
int value = ((IntGaugeMetricVo) customMetricVo).getValue();
intGaugeMetricBuilder.addValues(createIntValue(value));
} else {
intGaugeMetricBuilder.addValues(createNotSetIntValue());
}
}
PCustomMetric.Builder customMetricBuilder = PCustomMetric.newBuilder();
customMetricBuilder.setIntGaugeMetric(intGaugeMetricBuilder.build());
return customMetricBuilder.build();
}
Aggregations