From 04c47034d43d7795e13c1dcf156e1f6bcf31e65f Mon Sep 17 00:00:00 2001 From: Wenjun Ruan Date: Tue, 19 Jul 2022 11:52:18 +0800 Subject: [PATCH] Add task prepare metrics --- .../server/master/metrics/TaskMetrics.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java index c4516d0644..3f2ed1544f 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java @@ -30,57 +30,57 @@ public final class TaskMetrics { } private static final Counter TASK_SUBMIT_COUNTER = - Counter.builder("dolphinscheduler_task_submit_count") + Counter.builder("ds.task.submit.count") .description("Task submit total count") .register(Metrics.globalRegistry); private static final Counter TASK_FINISH_COUNTER = - Counter.builder("dolphinscheduler_task_finish_count") + Counter.builder("ds.task.finish.count") .description("Task finish total count") .register(Metrics.globalRegistry); private static final Counter TASK_SUCCESS_COUNTER = - Counter.builder("dolphinscheduler_task_success_count") + Counter.builder("ds.task.success.count") .description("Task success total count") .register(Metrics.globalRegistry); private static final Counter TASK_FAILURE_COUNTER = - Counter.builder("dolphinscheduler_task_failure_count") + Counter.builder("ds.task.failure.count") .description("Task failure total count") .register(Metrics.globalRegistry); private static final Counter TASK_TIMEOUT_COUNTER = - Counter.builder("dolphinscheduler_task_timeout_count") + Counter.builder("ds.task.timeout.count") .description("Task timeout total count") .register(Metrics.globalRegistry); private static final Counter TASK_RETRY_COUNTER = - Counter.builder("dolphinscheduler_task_retry_count") + Counter.builder("ds.task.retry.count") .description("Task retry total count") .register(Metrics.globalRegistry); private static final Counter TASK_STOP_COUNTER = - Counter.builder("dolphinscheduler_task_stop_count") + Counter.builder("ds.task.stop.count") .description("Task stop total count") .register(Metrics.globalRegistry); private static final Counter TASK_FAILOVER_COUNTER = - Counter.builder("dolphinscheduler_task_failover_count") + Counter.builder("ds.task.failover.count") .description("Task failover total count") .register(Metrics.globalRegistry); private static final Counter TASK_DISPATCH_COUNTER = - Counter.builder("dolphinscheduler_task_dispatch_count") + Counter.builder("ds.task.dispatch.count") .description("Task dispatch count") .register(Metrics.globalRegistry); private static final Counter TASK_DISPATCHER_FAILED = - Counter.builder("dolphinscheduler_task_dispatch_failed_count") + Counter.builder("ds.task.dispatch.failure.count") .description("Task dispatch failed count") .register(Metrics.globalRegistry); private static final Counter TASK_DISPATCH_ERROR = - Counter.builder("dolphinscheduler_task_dispatch_error_count") + Counter.builder("ds.task.dispatch.error.count") .description("Task dispatch error") .register(Metrics.globalRegistry); @@ -88,9 +88,9 @@ public final class TaskMetrics { TASK_SUBMIT_COUNTER.increment(); } - public synchronized static void registerTaskRunning(Supplier consumer) { - Gauge.builder("dolphinscheduler_task_running_gauge", consumer) - .description("Task running count") + public synchronized static void registerTaskPrepared(Supplier consumer) { + Gauge.builder("ds.task.prepared", consumer) + .description("Task prepared count") .register(Metrics.globalRegistry); }