Add `isUrgent` tag to message delivery latency metrics
This commit is contained in:
parent
aef7f3fef8
commit
0f185a528d
|
@ -780,6 +780,7 @@ public class MessageController {
|
|||
messageMetrics.measureOutgoingMessageLatency(outgoingMessageEntity.serverTimestamp(),
|
||||
"rest",
|
||||
auth.getAuthenticatedDevice().isPrimary(),
|
||||
outgoingMessageEntity.urgent(),
|
||||
userAgent,
|
||||
clientReleaseManager);
|
||||
})
|
||||
|
|
|
@ -71,6 +71,7 @@ public final class MessageMetrics {
|
|||
public void measureOutgoingMessageLatency(final long serverTimestamp,
|
||||
final String channel,
|
||||
final boolean isPrimaryDevice,
|
||||
final boolean isUrgent,
|
||||
final String userAgent,
|
||||
final ClientReleaseManager clientReleaseManager) {
|
||||
|
||||
|
@ -78,6 +79,7 @@ public final class MessageMetrics {
|
|||
tags.add(UserAgentTagUtil.getPlatformTag(userAgent));
|
||||
tags.add(Tag.of("channel", channel));
|
||||
tags.add(Tag.of("isPrimary", String.valueOf(isPrimaryDevice)));
|
||||
tags.add(Tag.of("isUrgent", String.valueOf(isUrgent)));
|
||||
|
||||
UserAgentTagUtil.getClientVersionTag(userAgent, clientReleaseManager).ifPresent(tags::add);
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.atomic.LongAdder;
|
||||
import javax.annotation.Nullable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jetty.util.StaticException;
|
||||
import org.reactivestreams.Publisher;
|
||||
|
@ -47,11 +48,10 @@ import org.whispersystems.textsecuregcm.limits.MessageDeliveryLoopMonitor;
|
|||
import org.whispersystems.textsecuregcm.metrics.MessageMetrics;
|
||||
import org.whispersystems.textsecuregcm.metrics.MetricsUtil;
|
||||
import org.whispersystems.textsecuregcm.metrics.UserAgentTagUtil;
|
||||
import org.whispersystems.textsecuregcm.push.MessageSender;
|
||||
import org.whispersystems.textsecuregcm.push.WebSocketConnectionEventListener;
|
||||
import org.whispersystems.textsecuregcm.push.PushNotificationManager;
|
||||
import org.whispersystems.textsecuregcm.push.PushNotificationScheduler;
|
||||
import org.whispersystems.textsecuregcm.push.ReceiptSender;
|
||||
import org.whispersystems.textsecuregcm.push.WebSocketConnectionEventListener;
|
||||
import org.whispersystems.textsecuregcm.storage.ClientReleaseManager;
|
||||
import org.whispersystems.textsecuregcm.storage.Device;
|
||||
import org.whispersystems.textsecuregcm.storage.MessagesManager;
|
||||
|
@ -64,7 +64,6 @@ import reactor.core.observability.micrometer.Micrometer;
|
|||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.core.scheduler.Scheduler;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class WebSocketConnection implements WebSocketConnectionEventListener {
|
||||
|
||||
|
@ -255,6 +254,7 @@ public class WebSocketConnection implements WebSocketConnectionEventListener {
|
|||
messageMetrics.measureOutgoingMessageLatency(message.getServerTimestamp(),
|
||||
"websocket",
|
||||
auth.getAuthenticatedDevice().isPrimary(),
|
||||
message.getUrgent(),
|
||||
client.getUserAgent(),
|
||||
clientReleaseManager);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue