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
55223765
Commit
55223765
authored
4 years ago
by
Jon Chambers
Committed by
Jon Chambers
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Include a host tag with metrics.
parent
5089c37d
No related branches found
No related tags found
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/WhisperServerService.java
+20
-0
20 additions, 0 deletions
...rg/whispersystems/textsecuregcm/WhisperServerService.java
with
20 additions
and
0 deletions
service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java
+
20
−
0
View file @
55223765
...
...
@@ -40,6 +40,8 @@ import io.micrometer.datadog.DatadogConfig;
import
io.micrometer.datadog.DatadogMeterRegistry
;
import
io.micrometer.wavefront.WavefrontConfig
;
import
io.micrometer.wavefront.WavefrontMeterRegistry
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.net.http.HttpClient
;
import
java.time.Duration
;
import
java.util.ArrayList
;
...
...
@@ -272,6 +274,19 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
});
{
final
String
host
;
{
String
localHostName
=
"unknown"
;
try
{
localHostName
=
InetAddress
.
getLocalHost
().
getHostName
();
}
catch
(
final
UnknownHostException
ignored
)
{
}
host
=
localHostName
;
}
final
DatadogMeterRegistry
datadogMeterRegistry
=
new
DatadogMeterRegistry
(
new
DatadogConfig
()
{
@Override
public
String
get
(
final
String
key
)
{
...
...
@@ -287,6 +302,11 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
public
Duration
step
()
{
return
config
.
getDatadogConfiguration
().
getStep
();
}
@Override
public
String
hostTag
()
{
return
host
;
}
},
Clock
.
SYSTEM
);
datadogMeterRegistry
.
config
().
meterFilter
(
new
MeterFilter
()
{
...
...
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