khandelwal-prateek commented on code in PR #4118:
URL: https://github.com/apache/gobblin/pull/4118#discussion_r2624232134


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ProcessWorkUnitsWorkflowImpl.java:
##########
@@ -50,15 +54,22 @@
 import org.apache.gobblin.temporal.workflows.metrics.TemporalEventTimer;
 import org.apache.gobblin.util.PropertiesUtils;
 
+import static 
org.apache.gobblin.metrics.opentelemetry.GobblinOpenTelemetryMetricsConstants.DimensionKeys.*;
+import static 
org.apache.gobblin.metrics.opentelemetry.GobblinOpenTelemetryMetricsConstants.DimensionValues.*;
+
 
 @Slf4j
 public class ProcessWorkUnitsWorkflowImpl implements ProcessWorkUnitsWorkflow {
   public static final String CHILD_WORKFLOW_ID_BASE = "NestingExecWorkUnits";
   public static final String COMMIT_STEP_WORKFLOW_ID_BASE = 
"CommitStepWorkflow";
 
+  private EmitOTelMetrics emitOTelMetricsActivityStub;

Review Comment:
   the workflow implementations is now directly dependent on OpenTelemetry 
which creates tight coupling with Otel, this makes it harder to switch metrics 
system in future. We can introduce a metrics abstraction and use Otel metrics 
as one implementation.
   
   ```
   public interface JobMetricsRecorder {
   ...
   }
   
   public class OpenTelemetryJobMetricsRecorder implements JobMetricsRecorder {
       private final OpenTelemetryInstrumentation instrumentation;
       ...
   }
   
   public class ProcessWorkUnitsWorkflowImpl implements 
ProcessWorkUnitsWorkflow {
       private JobMetricsRecorder metricsRecorder;
       ...
   }
   ```



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