Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
Signed-off-by: gengjun-git <gengjun@starrocks.com>
  • Loading branch information
gengjun-git committed Aug 22, 2023
1 parent 4b2d14b commit ba5647e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fe/fe-core/src/main/java/com/starrocks/metric/MetricRepo.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import com.starrocks.service.ExecuteEnv;
import com.starrocks.system.Backend;
import com.starrocks.system.SystemInfoService;
import com.starrocks.task.AgentTaskQueue;
import com.starrocks.transaction.TransactionState;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -727,6 +728,16 @@ public Long getValue() {
};
queryCoordinatorCount.addLabel(new MetricLabel("type", "query_coordinator_count"));
STARROCKS_METRIC_REGISTER.addMetric(queryCoordinatorCount);

GaugeMetric<Long> agentTaskCount = new GaugeMetric<Long>("memory", MetricUnit.NOUNIT,
"The count of agent task") {
@Override
public Long getValue() {
return (long) AgentTaskQueue.getTaskNum();
}
};
agentTaskCount.addLabel(new MetricLabel("type", "agent_task_count"));
STARROCKS_METRIC_REGISTER.addMetric(agentTaskCount);
}

// to generate the metrics related to tablets of each backends
Expand Down

0 comments on commit ba5647e

Please sign in to comment.