Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signal-Server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GitHub Mirror
Signal
Signal-Server
Commits
6f075079
Commit
6f075079
authored
May 27, 2021
by
Ehren Kret
Browse files
Options
Downloads
Patches
Plain Diff
Add metric to count number of legacy messages sent
parent
3e61b5c4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java
+2
-0
2 additions, 0 deletions
...rsystems/textsecuregcm/controllers/MessageController.java
with
2 additions
and
0 deletions
service/src/main/java/org/whispersystems/textsecuregcm/controllers/MessageController.java
+
2
−
0
View file @
6f075079
...
@@ -134,6 +134,7 @@ public class MessageController {
...
@@ -134,6 +134,7 @@ public class MessageController {
private
final
ClusterLuaScript
recordInternationalUnsealedSenderMetricsScript
;
private
final
ClusterLuaScript
recordInternationalUnsealedSenderMetricsScript
;
private
static
final
String
LEGACY_MESSAGE_SENT_COUNTER
=
name
(
MessageController
.
class
,
"legacyMessageSent"
);
private
static
final
String
SENT_MESSAGE_COUNTER_NAME
=
name
(
MessageController
.
class
,
"sentMessages"
);
private
static
final
String
SENT_MESSAGE_COUNTER_NAME
=
name
(
MessageController
.
class
,
"sentMessages"
);
private
static
final
String
REJECT_UNSEALED_SENDER_COUNTER_NAME
=
name
(
MessageController
.
class
,
"rejectUnsealedSenderLimit"
);
private
static
final
String
REJECT_UNSEALED_SENDER_COUNTER_NAME
=
name
(
MessageController
.
class
,
"rejectUnsealedSenderLimit"
);
private
static
final
String
INTERNATIONAL_UNSEALED_SENDER_COUNTER_NAME
=
name
(
MessageController
.
class
,
"internationalUnsealedSender"
);
private
static
final
String
INTERNATIONAL_UNSEALED_SENDER_COUNTER_NAME
=
name
(
MessageController
.
class
,
"internationalUnsealedSender"
);
...
@@ -615,6 +616,7 @@ public class MessageController {
...
@@ -615,6 +616,7 @@ public class MessageController {
}
}
if
(
messageBody
.
isPresent
())
{
if
(
messageBody
.
isPresent
())
{
Metrics
.
counter
(
LEGACY_MESSAGE_SENT_COUNTER
).
increment
();
messageBuilder
.
setLegacyMessage
(
ByteString
.
copyFrom
(
messageBody
.
get
()));
messageBuilder
.
setLegacyMessage
(
ByteString
.
copyFrom
(
messageBody
.
get
()));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment