use of com.navercorp.pinpoint.profiler.monitor.metric.custom.DoubleGaugeMetricVo in project pinpoint by naver.
the class GrpcCustomMetricMessageConverter method createDoubleGaugeMetric.
private PCustomMetric createDoubleGaugeMetric(String metricName, CustomMetricVo[] customMetricVos) {
PDouleGaugeMetric.Builder doubleGaugeMetricBuilder = PDouleGaugeMetric.newBuilder();
doubleGaugeMetricBuilder.setName(metricName);
for (CustomMetricVo customMetricVo : customMetricVos) {
if (customMetricVo instanceof DoubleGaugeMetricVo) {
double value = ((DoubleGaugeMetricVo) customMetricVo).getValue();
doubleGaugeMetricBuilder.addValues(createDoubleValue(value));
} else {
doubleGaugeMetricBuilder.addValues(createNotSetDoubleValue());
}
}
PCustomMetric.Builder customMetricBuilder = PCustomMetric.newBuilder();
customMetricBuilder.setDoubleGaugeMetric(doubleGaugeMetricBuilder.build());
return customMetricBuilder.build();
}
Aggregations