homatthew commented on code in PR #3843:
URL: https://github.com/apache/gobblin/pull/3843#discussion_r1449726351


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/workflows/helloworld/GreetingWorkflowImpl.java:
##########
@@ -41,16 +50,19 @@ public class GreetingWorkflowImpl implements 
GreetingWorkflow {
      *
      * The activity options that were defined above are passed in as a 
parameter.
      */
-    private final FormatActivity activity = 
Workflow.newActivityStub(FormatActivity.class, options);
+    private final FormatActivity formatActivity = 
Workflow.newActivityStub(FormatActivity.class, options);
+    private final GobblinTrackingEventActivity timerActivity = 
Workflow.newActivityStub(GobblinTrackingEventActivity.class, options);
 
     // This is the entry point to the Workflow.
     @Override
-    public String getGreeting(String name) {
-
+    public String getGreeting(String name, EventSubmitter eventSubmitter) {
         /**
-         * If there were other Activity methods they would be orchestrated 
here or from within other Activities.
-         * This is a blocking call that returns only after the activity has 
completed.
+         * Example of the {@link TemporalEventTimer.Factory} invoking child 
activity for instrumentation.
          */
-        return activity.composeGreeting(name);
+        TemporalEventTimer.Factory timerFactory = new 
TemporalEventTimer.Factory(timerActivity, eventSubmitter);
+        try (TemporalEventTimer timer = timerFactory.get("getGreetingTime")) {
+            LOG.info("Executing getGreeting");

Review Comment:
   Ignoring the fact this is a toy example, the temporal logger logs some 
information by default about the workflow / run



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