Add prefix to executor metric names

This commit is contained in:
Chris Eager 2023-04-04 10:14:41 -05:00 committed by ravi-signal
parent 2697872bdd
commit 23d5006f70
3 changed files with 15 additions and 15 deletions

View File

@ -436,7 +436,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
.maxThreads(80)
.workQueue(messageDeliveryQueue)
.build(),
MetricsUtil.name(getClass(), "messageDeliveryExecutor")),
MetricsUtil.name(getClass(), "messageDeliveryExecutor"), MetricsUtil.PREFIX),
"messageDelivery");
// TODO: generally speaking this is a DynamoDB I/O executor for the accounts table; we should eventually have a general executor for speaking to the accounts table, but most of the server is still synchronous so this isn't widely useful yet
ExecutorService batchIdentityCheckExecutor = environment.lifecycle().executorService(name(getClass(), "batchIdentityCheck-%d")).minThreads(32).maxThreads(32).build();

View File

@ -7,7 +7,7 @@ package org.whispersystems.textsecuregcm.metrics;
public class MetricsUtil {
private static final String PREFIX = "chat";
public static final String PREFIX = "chat";
/**
* Returns a dot-separated ('.') name for the given class and name parts

View File

@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Signal Messenger, LLC
* Copyright 2013 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -36,7 +36,7 @@ public class ReceiptSender {
new InstrumentedExecutorService(executor,
SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME),
MetricsUtil.name(ReceiptSender.class, "executor")),
MetricsUtil.name(ReceiptSender.class, "executor"))
MetricsUtil.name(ReceiptSender.class, "executor"), MetricsUtil.PREFIX)
;
}