[ 
https://issues.apache.org/jira/browse/GOBBLIN-1639?focusedWorklogId=766293&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-766293
 ]

ASF GitHub Bot logged work on GOBBLIN-1639:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/May/22 21:16
            Start Date: 04/May/22 21:16
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on code in PR #3500:
URL: https://github.com/apache/gobblin/pull/3500#discussion_r865392351


##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java:
##########
@@ -685,8 +674,23 @@ public void apply(JobListener jobListener, JobContext 
jobContext)
         }
       }
     } finally {
-      // Stop metrics reporting
+      // Register metrics then stop metrics reporting, metrics will flush and 
emit when the metricsContext is closed
       if (this.jobContext.getJobMetricsOptional().isPresent()) {
+        if 
(jobState.getPropAsBoolean(ConfigurationKeys.GOBBLIN_OUTPUT_JOB_LEVEL_METRICS, 
true)) {
+          String workunitCreationGaugeName = 
MetricRegistry.name(ServiceMetricNames.GOBBLIN_JOB_METRICS_PREFIX,
+              TimingEvent.LauncherTimings.WORK_UNITS_CREATION, 
jobState.getJobName());
+          long workUnitsCreationTime = workUnitsCreationTimer.getDuration() / 
TimeUnit.SECONDS.toMillis(1);
+          ContextAwareGauge<Integer> workunitCreationGauge = 
this.runtimeMetricContext.get()
+              .newContextAwareGauge(workunitCreationGaugeName, () -> (int) 
workUnitsCreationTime);
+          this.runtimeMetricContext.get().register(workunitCreationGaugeName, 
workunitCreationGauge);
+
+          String workunitCountGaugeName = 
MetricRegistry.name(ServiceMetricNames.GOBBLIN_JOB_METRICS_PREFIX,

Review Comment:
   We change the guage name here, seems like one backward incompatible change 
and might require user communication. We also need to remove old rrd





Issue Time Tracking
-------------------

    Worklog Id:     (was: 766293)
    Time Spent: 0.5h  (was: 20m)

> Remove adhoc job metric emission and also provide a more uniform way of 
> emitting per pipeline metrics on Gobblin
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1639
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1639
>             Project: Apache Gobblin
>          Issue Type: Task
>          Components: gobblin-service
>            Reporter: William Lo
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Gobblin flows still emit certain metrics by default.
> 1. GaaS flows which are adhoc should not be emitting metrics outside of GTE
> 2. Per pipeline metrics are too disorganized right now, need to unify them 
> and this can be the first step.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to