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

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

                Author: ASF GitHub Bot
            Created on: 07/Oct/21 23:42
            Start Date: 07/Oct/21 23:42
    Worklog Time Spent: 10m 
      Work Description: umustafi commented on a change in pull request #3411:
URL: https://github.com/apache/gobblin/pull/3411#discussion_r724603661



##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaJobStatusMonitor.java
##########
@@ -323,6 +344,11 @@ private void emitWorkUnitCountMetric(GobblinTrackingEvent 
event) {
           () -> this.flowNameGroupToWorkUnitCount.get(workUnitCountName));
       this.getMetricContext().register(workUnitCountName, gauge);
     }
+
+   // Schedule this gauge to be removed after emission
+    Runnable task = new RunnableWithMetricContext(this.getMetricContext(), 
workUnitCountName);
+    ScheduledFuture<?> future = this.scheduler.schedule(task, 
EXPECTED_TIME_FOR_METRICS_REPORTING, TimeUnit.SECONDS);

Review comment:
       One issue I foresee with this is if two jobs in a multi-job flow are 
initiated shortly after each other and the gauge value is changed, then the 
future may delete the gauge before it is reported. However, I'm not sure how to 
deal with this case. Do we expect this to be frequent?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 662422)
    Time Spent: 20m  (was: 10m)

> Fix WorkUnit Count Reporting to InGraphs 
> -----------------------------------------
>
>                 Key: GOBBLIN-1560
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1560
>             Project: Apache Gobblin
>          Issue Type: Improvement
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> At the moment, once a gauge for work unit count is set. The value will be 
> continually emitted to inGraphs until the value is changed, making it 
> confusing for users viewing inGraphs such as 
> [https://ingraphs.prod.linkedin.com/range/%25%25%25prod-lva1.product.disre-service-deployable2/graph/SharedGobblinServiceLva1/GobblinService.ktwo.k2-war-snap-sas-ad_page_sets-with-ret-1.WorkUnitsCreated.rrd?fabrics=prod-lva1]
>  to tell what the most recently set value is. Instead we will unregister this 
> gauge after an interval we expect the value to be emitted to inGraphs so the 
> graph will appear as a set of data points. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to