Add prefix to executor metric names
This commit is contained in:
parent
2697872bdd
commit
23d5006f70
|
@ -430,14 +430,14 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
|||
|
||||
// using 80 threads to match Schedulers.boundedElastic() behavior
|
||||
Scheduler messageDeliveryScheduler = Schedulers.fromExecutorService(
|
||||
ExecutorServiceMetrics.monitor(Metrics.globalRegistry,
|
||||
environment.lifecycle().executorService(name(getClass(), "messageDelivery-%d"))
|
||||
.minThreads(80)
|
||||
.maxThreads(80)
|
||||
.workQueue(messageDeliveryQueue)
|
||||
.build(),
|
||||
MetricsUtil.name(getClass(), "messageDeliveryExecutor")),
|
||||
"messageDelivery");
|
||||
ExecutorServiceMetrics.monitor(Metrics.globalRegistry,
|
||||
environment.lifecycle().executorService(name(getClass(), "messageDelivery-%d"))
|
||||
.minThreads(80)
|
||||
.maxThreads(80)
|
||||
.workQueue(messageDeliveryQueue)
|
||||
.build(),
|
||||
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();
|
||||
ExecutorService multiRecipientMessageExecutor = environment.lifecycle()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2013-2022 Signal Messenger, LLC
|
||||
* Copyright 2013 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
|
@ -32,11 +32,11 @@ public class ReceiptSender {
|
|||
this.accountManager = accountManager;
|
||||
this.messageSender = messageSender;
|
||||
this.executor = ExecutorServiceMetrics.monitor(
|
||||
Metrics.globalRegistry,
|
||||
new InstrumentedExecutorService(executor,
|
||||
SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME),
|
||||
MetricsUtil.name(ReceiptSender.class, "executor")),
|
||||
MetricsUtil.name(ReceiptSender.class, "executor"))
|
||||
Metrics.globalRegistry,
|
||||
new InstrumentedExecutorService(executor,
|
||||
SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME),
|
||||
MetricsUtil.name(ReceiptSender.class, "executor")),
|
||||
MetricsUtil.name(ReceiptSender.class, "executor"), MetricsUtil.PREFIX)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue