Skip to content

Commit 8154bb1

Browse files
committed
Add a dedicated counter for "persist node" events
1 parent b647853 commit 8154bb1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagePersister.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class MessagePersister implements Managed {
7373
private static final Counter TRIMMED_MESSAGE_COUNTER = Metrics.counter(name(MessagePersister.class, "trimmedMessage"));
7474
private static final Counter TRIMMED_MESSAGE_BYTES_COUNTER = Metrics.counter(name(MessagePersister.class, "trimmedMessageBytes"));
7575

76+
private static final Counter PERSIST_NODE_COUNTER = Metrics.counter(name(MessagePersister.class, "persistNodeCount"));
7677
private static final LongTaskTimer PERSIST_NODE_TIMER = Metrics.more().longTaskTimer(name(MessagePersister.class, "persistNode"));
7778

7879
private static final String QUEUE_SIZE_DISTRIBUTION_SUMMARY_NAME = name(MessagePersister.class, "queueSize");
@@ -259,6 +260,7 @@ int persistNode(final RedisClusterNode node) {
259260
.orElse(0);
260261
} finally {
261262
sample.stop();
263+
PERSIST_NODE_COUNTER.increment();
262264
}
263265
}
264266

0 commit comments

Comments
 (0)