mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 00:30:21 +01:00
Add an isEphemeral dimension to message delivery latency metrics
This commit is contained in:
committed by
ravi-signal
parent
4ffd164461
commit
9a1da23bdb
@@ -781,6 +781,10 @@ public class MessageController {
|
||||
"rest",
|
||||
auth.getAuthenticatedDevice().isPrimary(),
|
||||
outgoingMessageEntity.urgent(),
|
||||
// Messages fetched via this endpoint (as opposed to WebSocketConnection) are never ephemeral
|
||||
// because, by definition, the client doesn't have a "live" connection via which to receive
|
||||
// ephemeral messages.
|
||||
false,
|
||||
userAgent,
|
||||
clientReleaseManager);
|
||||
})
|
||||
|
||||
@@ -72,14 +72,16 @@ public final class MessageMetrics {
|
||||
final String channel,
|
||||
final boolean isPrimaryDevice,
|
||||
final boolean isUrgent,
|
||||
final boolean isEphemeral,
|
||||
final String userAgent,
|
||||
final ClientReleaseManager clientReleaseManager) {
|
||||
|
||||
final List<Tag> tags = new ArrayList<>(4);
|
||||
final List<Tag> tags = new ArrayList<>();
|
||||
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)));
|
||||
tags.add(Tag.of("isEphemeral", String.valueOf(isEphemeral)));
|
||||
|
||||
UserAgentTagUtil.getClientVersionTag(userAgent, clientReleaseManager).ifPresent(tags::add);
|
||||
|
||||
|
||||
@@ -255,6 +255,7 @@ public class WebSocketConnection implements WebSocketConnectionEventListener {
|
||||
"websocket",
|
||||
auth.getAuthenticatedDevice().isPrimary(),
|
||||
message.getUrgent(),
|
||||
message.getEphemeral(),
|
||||
client.getUserAgent(),
|
||||
clientReleaseManager);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user