mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-27 00:43:20 +01:00
JSON metrics reporting.
This commit is contained in:
@@ -24,6 +24,7 @@ import com.yammer.dropwizard.config.HttpConfiguration;
|
||||
import com.yammer.dropwizard.db.DatabaseConfiguration;
|
||||
import com.yammer.dropwizard.jdbi.DBIFactory;
|
||||
import com.yammer.dropwizard.migrations.MigrationsBundle;
|
||||
import com.yammer.metrics.Metrics;
|
||||
import com.yammer.metrics.core.Clock;
|
||||
import com.yammer.metrics.core.MetricPredicate;
|
||||
import com.yammer.metrics.reporting.DatadogReporter;
|
||||
@@ -48,6 +49,7 @@ import org.whispersystems.textsecuregcm.federation.FederatedPeer;
|
||||
import org.whispersystems.textsecuregcm.limits.RateLimiters;
|
||||
import org.whispersystems.textsecuregcm.mappers.IOExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.mappers.RateLimitExceededExceptionMapper;
|
||||
import org.whispersystems.textsecuregcm.metrics.JsonMetricsReporter;
|
||||
import org.whispersystems.textsecuregcm.providers.MemcacheHealthCheck;
|
||||
import org.whispersystems.textsecuregcm.providers.MemcachedClientFactory;
|
||||
import org.whispersystems.textsecuregcm.providers.RedisClientFactory;
|
||||
@@ -168,11 +170,11 @@ public class WhisperServerService extends Service<WhisperServerConfiguration> {
|
||||
config.getGraphiteConfiguration().getPort());
|
||||
}
|
||||
|
||||
if (config.getDataDogConfiguration().isEnabled()) {
|
||||
new DatadogReporter.Builder().withApiKey(config.getDataDogConfiguration().getApiKey())
|
||||
.withVmMetricsEnabled(true)
|
||||
.build()
|
||||
.start(15, TimeUnit.SECONDS);
|
||||
if (config.getMetricsConfiguration().isEnabled()) {
|
||||
new JsonMetricsReporter("textsecure", Metrics.defaultRegistry(),
|
||||
config.getMetricsConfiguration().getToken(),
|
||||
config.getMetricsConfiguration().getHost())
|
||||
.start(60, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user