mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 09:08:02 +01:00
Update a metric provider dependency and remove a workaround for an upstream issue.
This commit is contained in:
committed by
Jon Chambers
parent
b97158bf7b
commit
30948de13d
@@ -227,12 +227,9 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||
final Map<String, MicrometerConfiguration> micrometerConfigurationByName = config.getMicrometerConfiguration();
|
||||
|
||||
{
|
||||
// This is a workaround for an issue where the configured step duration isn't being honored by
|
||||
// WavefrontMeterRegistry; we can simplify if https://github.com/micrometer-metrics/micrometer/pull/2173 gets
|
||||
// merged.
|
||||
final MicrometerConfiguration micrometerWavefrontConfig = micrometerConfigurationByName.get("wavefront");
|
||||
|
||||
final WavefrontConfig wavefrontConfig = new WavefrontConfig() {
|
||||
Metrics.addRegistry(new WavefrontMeterRegistry(new WavefrontConfig() {
|
||||
@Override
|
||||
public String get(final String key) {
|
||||
return null;
|
||||
@@ -247,15 +244,15 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||
public String apiToken() {
|
||||
return micrometerWavefrontConfig.getApiKey();
|
||||
}
|
||||
};
|
||||
|
||||
final WavefrontSender wavefrontSender = WavefrontMeterRegistry.getDefaultSenderBuilder(wavefrontConfig)
|
||||
.flushIntervalSeconds((int)wavefrontConfig.step().toSeconds())
|
||||
.build();
|
||||
|
||||
Metrics.addRegistry(WavefrontMeterRegistry.builder(wavefrontConfig)
|
||||
.wavefrontSender(wavefrontSender)
|
||||
.build());
|
||||
}, Clock.SYSTEM) {
|
||||
@Override
|
||||
protected DistributionStatisticConfig defaultHistogramConfig() {
|
||||
return DistributionStatisticConfig.builder()
|
||||
.percentiles(.75, .95, .99, .999)
|
||||
.build()
|
||||
.merge(super.defaultHistogramConfig());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user