[
https://issues.apache.org/jira/browse/GOBBLIN-1672?focusedWorklogId=797379&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-797379
]
ASF GitHub Bot logged work on GOBBLIN-1672:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Aug/22 20:32
Start Date: 02/Aug/22 20:32
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on code in PR #3532:
URL: https://github.com/apache/gobblin/pull/3532#discussion_r936001512
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerMetrics.java:
##########
@@ -0,0 +1,253 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.gobblin.service.modules.orchestration;
+
+import com.codahale.metrics.MetricRegistry;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.collect.Maps;
+import com.typesafe.config.Config;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.gobblin.configuration.ConfigurationKeys;
+import org.apache.gobblin.metrics.ContextAwareCounter;
+import org.apache.gobblin.metrics.ContextAwareGauge;
+import org.apache.gobblin.metrics.ContextAwareMeter;
+import org.apache.gobblin.metrics.MetricContext;
+import org.apache.gobblin.metrics.RootMetricContext;
+import org.apache.gobblin.metrics.ServiceMetricNames;
+import org.apache.gobblin.metrics.metric.filter.MetricNameRegexFilter;
+import org.apache.gobblin.service.FlowId;
+import org.apache.gobblin.service.RequesterService;
+import org.apache.gobblin.service.ServiceRequester;
+import org.apache.gobblin.service.modules.flowgraph.Dag;
+import org.apache.gobblin.service.modules.spec.JobExecutionPlan;
+import org.apache.gobblin.util.ConfigUtils;
+
+
+@Slf4j
+public class DagManagerMetrics {
+ private static final Map<String, DagManager.FlowState> flowGauges =
Maps.newConcurrentMap();
+ // Meters representing the total number of flows in a given state
+ private ContextAwareMeter allSuccessfulMeter;
+ private ContextAwareMeter allFailedMeter;
+ private ContextAwareMeter allRunningMeter;
+ private ContextAwareMeter allSlaExceededMeter;
+ private ContextAwareMeter allStartSlaExceededMeter;
+ // Meters representing the flows in a given state per flowgroup
+ private final Map<String, ContextAwareMeter> groupSuccessfulMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> groupFailureMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> groupStartSlaExceededMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> groupSlaExceededMeters =
Maps.newConcurrentMap();
+
+ // Meters representing the jobs in a given state per executor
+ // These metrics need to be invoked differently to account for automated
retries and multihop scenarios.
+ private final Map<String, ContextAwareMeter> executorSuccessMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> executorFailureMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> executorStartSlaExceededMeters
= Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> executorSlaExceededMeters =
Maps.newConcurrentMap();
+ private final Map<String, ContextAwareMeter> executorJobSentMeters =
Maps.newConcurrentMap();
+ private boolean instrumentationEnabled;
+ MetricContext metricContext;
+
+ public DagManagerMetrics(MetricContext metricContext, boolean
instrumentationEnabled) {
Review Comment:
should we just have metricContext in this signature?
Issue Time Tracking
-------------------
Worklog Id: (was: 797379)
Time Spent: 50m (was: 40m)
> Refactor metrics in dagmanager and add per spec executor metrics
> ----------------------------------------------------------------
>
> Key: GOBBLIN-1672
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1672
> Project: Apache Gobblin
> Issue Type: Improvement
> Components: gobblin-service
> Reporter: William Lo
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Add the following metrics:
> 1. Success per executor
> 2. Fail per executor
> 3. SLA killed per executor
> 4. SLA killed per flowgroup
> 5. SLA killed per user
> 6. SLA killed overall
--
This message was sent by Atlassian Jira
(v8.20.10#820010)