phet commented on code in PR #3865:
URL: https://github.com/apache/gobblin/pull/3865#discussion_r1473359527


##########
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/cluster/ServiceBasedAppLauncherWithoutMetrics.java:
##########
@@ -0,0 +1,22 @@
+package org.apache.gobblin.temporal.cluster;
+
+import java.util.Properties;
+
+import org.apache.gobblin.runtime.app.ServiceBasedAppLauncher;
+
+
+/**
+ * {@link ServiceBasedAppLauncher} that does not add metrics service. This is 
different from deactivating the flag
+ * {@link 
org.apache.gobblin.configuration.ConfigurationKeys#METRICS_ENABLED_KEY} because 
this will only not initialize
+ * the metrics service in the cluster manager but still allow for {@link 
org.apache.gobblin.metrics.GobblinTrackingEvent}
+ */
+public class ServiceBasedAppLauncherWithoutMetrics extends 
ServiceBasedAppLauncher {
+  public ServiceBasedAppLauncherWithoutMetrics(Properties properties, String 
appName)
+      throws Exception {
+    super(properties, appName);
+  }
+
+  @Override
+  protected void addMetricsService(Properties properties) {

Review Comment:
   alternative (w/o disabling gobblin metrics overall) would be to add an 
additional config here:
   ```
   if (GobblinMetrics.isEnabled(properties))
   ```
   (overall I prefer to use inheritance when there's not a simpler alt)



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