use of com.navercorp.pinpoint.profiler.monitor.metric.custom.LongGaugeMetricVo in project pinpoint by naver.
the class GrpcCustomMetricMessageConverter method createLongGaugeMetric.
private PCustomMetric createLongGaugeMetric(String metricName, CustomMetricVo[] customMetricVos) {
PLongGaugeMetric.Builder longGaugeMetricBuilder = PLongGaugeMetric.newBuilder();
longGaugeMetricBuilder.setName(metricName);
for (CustomMetricVo customMetricVo : customMetricVos) {
if (customMetricVo instanceof LongGaugeMetricVo) {
long value = ((LongGaugeMetricVo) customMetricVo).getValue();
longGaugeMetricBuilder.addValues(createLongValue(value));
} else {
longGaugeMetricBuilder.addValues(createNotSetLongValue());
}
}
PCustomMetric.Builder customMetricBuilder = PCustomMetric.newBuilder();
customMetricBuilder.setLongGaugeMetric(longGaugeMetricBuilder.build());
return customMetricBuilder.build();
}
Aggregations