Update a metric provider dependency and remove a workaround for an upstream issue.
This commit is contained in:
parent
b97158bf7b
commit
30948de13d
|
@ -77,7 +77,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.micrometer</groupId>
|
<groupId>io.micrometer</groupId>
|
||||||
<artifactId>micrometer-registry-wavefront</artifactId>
|
<artifactId>micrometer-registry-wavefront</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.5.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -227,12 +227,9 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||||
final Map<String, MicrometerConfiguration> micrometerConfigurationByName = config.getMicrometerConfiguration();
|
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 MicrometerConfiguration micrometerWavefrontConfig = micrometerConfigurationByName.get("wavefront");
|
||||||
|
|
||||||
final WavefrontConfig wavefrontConfig = new WavefrontConfig() {
|
Metrics.addRegistry(new WavefrontMeterRegistry(new WavefrontConfig() {
|
||||||
@Override
|
@Override
|
||||||
public String get(final String key) {
|
public String get(final String key) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -247,15 +244,15 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||||
public String apiToken() {
|
public String apiToken() {
|
||||||
return micrometerWavefrontConfig.getApiKey();
|
return micrometerWavefrontConfig.getApiKey();
|
||||||
}
|
}
|
||||||
};
|
}, Clock.SYSTEM) {
|
||||||
|
@Override
|
||||||
final WavefrontSender wavefrontSender = WavefrontMeterRegistry.getDefaultSenderBuilder(wavefrontConfig)
|
protected DistributionStatisticConfig defaultHistogramConfig() {
|
||||||
.flushIntervalSeconds((int)wavefrontConfig.step().toSeconds())
|
return DistributionStatisticConfig.builder()
|
||||||
.build();
|
.percentiles(.75, .95, .99, .999)
|
||||||
|
.build()
|
||||||
Metrics.addRegistry(WavefrontMeterRegistry.builder(wavefrontConfig)
|
.merge(super.defaultHistogramConfig());
|
||||||
.wavefrontSender(wavefrontSender)
|
}
|
||||||
.build());
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue