[monitor] 设计参数定义参数值表结构及相应实体

This commit is contained in:
tomsun28
2021-11-13 22:36:22 +08:00
parent 0760a6d5f9
commit 2284621527
6 changed files with 176 additions and 20 deletions

View File

@@ -100,7 +100,7 @@ public class CommonDispatcher implements MetricsTaskDispatch, CollectDataDispatc
if (metricsTime.getStartTime() < deadline) {
// 指标组采集超时
CollectRep.MetricsData metricsData = CollectRep.MetricsData.newBuilder()
.setId(metricsTime.getTimerJob().getJob().getAppId())
.setId(metricsTime.getTimerJob().getJob().getMonitorId())
.setApp(metricsTime.getTimerJob().getJob().getApp())
.setMetrics(metricsTime.getMetrics().getName())
.setTime(System.currentTimeMillis())

View File

@@ -76,7 +76,7 @@ public class MetricsCollect implements Runnable, Comparable<MetricsCollect> {
return;
} else {
try {
abstractCollect.collect(response, timerJob.getJob().getAppId(),
abstractCollect.collect(response, timerJob.getJob().getMonitorId(),
timerJob.getJob().getApp(), metrics);
} catch (Exception e) {
log.error("[Metrics Collect]: {}.", e.getMessage(), e);
@@ -155,7 +155,7 @@ public class MetricsCollect implements Runnable, Comparable<MetricsCollect> {
}
private void setNewThreadName(WheelTimerJob timerJob, Metrics metrics) {
String currentName = timerJob.getJob().getAppId() + "-" + timerJob.getJob().getApp()
String currentName = timerJob.getJob().getMonitorId() + "-" + timerJob.getJob().getApp()
+ "-" + metrics.getName() + "-" + timerJob.getJob().getId();
Thread.currentThread().setName(currentName);
}