Initialize metrics in `MessagePersisterServiceCommand`
This commit is contained in:
parent
defdc14d5e
commit
0edd99e9cf
|
@ -14,8 +14,10 @@ import net.sourceforge.argparse4j.inf.Namespace;
|
||||||
import net.sourceforge.argparse4j.inf.Subparser;
|
import net.sourceforge.argparse4j.inf.Subparser;
|
||||||
import org.whispersystems.textsecuregcm.WhisperServerConfiguration;
|
import org.whispersystems.textsecuregcm.WhisperServerConfiguration;
|
||||||
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
|
||||||
|
import org.whispersystems.textsecuregcm.metrics.MetricsUtil;
|
||||||
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
||||||
import org.whispersystems.textsecuregcm.storage.MessagePersister;
|
import org.whispersystems.textsecuregcm.storage.MessagePersister;
|
||||||
|
import org.whispersystems.textsecuregcm.util.logging.UncaughtExceptionHandler;
|
||||||
|
|
||||||
public class MessagePersisterServiceCommand extends EnvironmentCommand<WhisperServerConfiguration> {
|
public class MessagePersisterServiceCommand extends EnvironmentCommand<WhisperServerConfiguration> {
|
||||||
|
|
||||||
|
@ -45,6 +47,10 @@ public class MessagePersisterServiceCommand extends EnvironmentCommand<WhisperSe
|
||||||
protected void run(Environment environment, Namespace namespace, WhisperServerConfiguration configuration)
|
protected void run(Environment environment, Namespace namespace, WhisperServerConfiguration configuration)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
|
UncaughtExceptionHandler.register();
|
||||||
|
|
||||||
|
MetricsUtil.configureRegistries(configuration, environment);
|
||||||
|
|
||||||
final CommandDependencies deps = CommandDependencies.build("message-persister-service", environment, configuration);
|
final CommandDependencies deps = CommandDependencies.build("message-persister-service", environment, configuration);
|
||||||
|
|
||||||
final DynamicConfigurationManager<DynamicConfiguration> dynamicConfigurationManager = new DynamicConfigurationManager<>(
|
final DynamicConfigurationManager<DynamicConfiguration> dynamicConfigurationManager = new DynamicConfigurationManager<>(
|
||||||
|
|
Loading…
Reference in New Issue