Will-Lo commented on code in PR #3962:
URL: https://github.com/apache/gobblin/pull/3962#discussion_r1696093690


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/GaaSJobObservabilityEventProducer.java:
##########
@@ -123,7 +129,11 @@ private void setupMetrics(State state) {
 
   public void emitObservabilityEvent(final State jobState) {
     GaaSJobObservabilityEvent event = createGaaSObservabilityEvent(jobState);
-    sendUnderlyingEvent(event);
+    if 
(jobState.getProp(TimingEvent.FlowEventConstants.JOB_NAME_FIELD).equals(JobStatusRetriever.NA_KEY)
 && this.emitFlowObservabilityEvent) {

Review Comment:
   At this point JOB_NAME_FIELD gets populated by the jobstatus monitor before 
it emits the observability event
   ```
     static Pair<org.apache.gobblin.configuration.State, NewState> 
recalcJobStatus(org.apache.gobblin.configuration.State jobStatus,
         StateStore<org.apache.gobblin.configuration.State> stateStore) throws 
IOException {
       try {
         if 
(!jobStatus.contains(TimingEvent.FlowEventConstants.JOB_NAME_FIELD)) {
           jobStatus.setProp(TimingEvent.FlowEventConstants.JOB_NAME_FIELD, 
JobStatusRetriever.NA_KEY);
         }
   ```      
   and this is called right after parsing the job status



-- 
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]

Reply via email to