Make reporting intervals configurable.
This commit is contained in:
parent
c545cff1b3
commit
735573e61b
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue