You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/10/31 20:04:53 UTC

[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3593: [GOBBLIN-1736] Add metrics for change stream monitor and mysql quota manager

ZihanLi58 commented on code in PR #3593:
URL: https://github.com/apache/gobblin/pull/3593#discussion_r1009819811


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlUserQuotaManager.java:
##########
@@ -80,18 +87,21 @@ public void init(Collection<Dag<JobExecutionPlan>> dags) {
 
   @Override
   public void checkQuota(Collection<Dag.DagNode<JobExecutionPlan>> dagNodes) throws IOException {
-    try (Connection connection = this.quotaStore.dataSource.getConnection()) {
+    try (Connection connection = this.quotaStore.dataSource.getConnection();
+        Timer.Context context = metricContext.timer(RuntimeMetrics.GOBBLIN_MYSQL_QUOTA_MANAGER_CHECK_QUOTA_TIME).time()) {

Review Comment:
   This is in try clause, when this try section finish, the context will close automatically



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@gobblin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org