From 7ffccd9c3af83db4c7a9842c6786a07ad0b6d202 Mon Sep 17 00:00:00 2001 From: Chris Eager Date: Fri, 26 May 2023 12:26:27 -0500 Subject: [PATCH] Initialize metrics in `ScheduledApnPushNotificationSenderServiceCommand` --- .../ScheduledApnPushNotificationSenderServiceCommand.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java b/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java index 2c95f0f6a..68f035360 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/workers/ScheduledApnPushNotificationSenderServiceCommand.java @@ -16,10 +16,12 @@ import net.sourceforge.argparse4j.inf.Namespace; import net.sourceforge.argparse4j.inf.Subparser; import org.whispersystems.textsecuregcm.WhisperServerConfiguration; import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration; +import org.whispersystems.textsecuregcm.metrics.MetricsUtil; import org.whispersystems.textsecuregcm.push.APNSender; import org.whispersystems.textsecuregcm.push.ApnPushNotificationScheduler; import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster; import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager; +import org.whispersystems.textsecuregcm.util.logging.UncaughtExceptionHandler; public class ScheduledApnPushNotificationSenderServiceCommand extends EnvironmentCommand { @@ -49,6 +51,10 @@ public class ScheduledApnPushNotificationSenderServiceCommand extends Environmen protected void run(Environment environment, Namespace namespace, WhisperServerConfiguration configuration) throws Exception { + UncaughtExceptionHandler.register(); + + MetricsUtil.configureRegistries(configuration, environment); + final CommandDependencies deps = CommandDependencies.build("scheduled-apn-sender", environment, configuration); final FaultTolerantRedisCluster pushSchedulerCluster = new FaultTolerantRedisCluster("push_scheduler",