diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java index 85f8c4a0201c0288fe39834bdbf3202acced160c..385717608c7a052554dc3be378b134756b48ea79 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/WhisperServerService.java @@ -293,6 +293,11 @@ public class WhisperServerService extends Application<WhisperServerConfiguration public String apiKey() { return config.getDatadogConfiguration().getApiKey(); } + + @Override + public Duration step() { + return config.getDatadogConfiguration().getStep(); + } }, Clock.SYSTEM); datadogMeterRegistry.config().meterFilter(new MeterFilter() { diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/configuration/DatadogConfiguration.java b/service/src/main/java/org/whispersystems/textsecuregcm/configuration/DatadogConfiguration.java index e195682d09bb85add0d6351c6362c6a6041719e2..6731a2bb10014e3bfe8de2d6f2b7f283de5dd601 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/configuration/DatadogConfiguration.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/configuration/DatadogConfiguration.java @@ -7,6 +7,8 @@ package org.whispersystems.textsecuregcm.configuration; import com.fasterxml.jackson.annotation.JsonProperty; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.Duration; public class DatadogConfiguration { @@ -14,7 +16,15 @@ public class DatadogConfiguration { @NotBlank private String apiKey; + @JsonProperty + @NotNull + private Duration step = Duration.ofSeconds(10); + public String getApiKey() { return apiKey; } + + public Duration getStep() { + return step; + } }