Use first party metric aggregator libraries where possible.
This commit is contained in:
parent
e25914c3d3
commit
33a0c4a9ae
|
@ -81,9 +81,9 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<groupId>com.newrelic.telemetry</groupId>
|
||||
<artifactId>micrometer-registry-new-relic</artifactId>
|
||||
<version>1.5.2</version>
|
||||
<version>0.5.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -43,10 +43,9 @@ import io.dropwizard.setup.Bootstrap;
|
|||
import io.dropwizard.setup.Environment;
|
||||
import io.lettuce.core.RedisURI;
|
||||
import io.lettuce.core.cluster.RedisClusterClient;
|
||||
import io.micrometer.core.instrument.Clock;
|
||||
import io.micrometer.NewRelicRegistryConfig;
|
||||
import io.micrometer.core.instrument.Metrics;
|
||||
import io.micrometer.newrelic.NewRelicConfig;
|
||||
import io.micrometer.newrelic.NewRelicMeterRegistry;
|
||||
import io.micrometer.newrelic.NewRelicRegistry;
|
||||
import io.micrometer.wavefront.WavefrontConfig;
|
||||
import io.micrometer.wavefront.WavefrontMeterRegistry;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
|
@ -252,22 +251,17 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
|||
{
|
||||
final MicrometerConfiguration micrometerNewRelicConfig = micrometerConfigurationByName.get("newrelic");
|
||||
|
||||
Metrics.addRegistry(new NewRelicMeterRegistry(new NewRelicConfig() {
|
||||
Metrics.addRegistry(NewRelicRegistry.builder(new NewRelicRegistryConfig() {
|
||||
@Override
|
||||
public String get(final String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String accountId() {
|
||||
return micrometerNewRelicConfig.getAccountId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String apiKey() {
|
||||
return micrometerNewRelicConfig.getApiKey();
|
||||
}
|
||||
}, Clock.SYSTEM));
|
||||
}).build());
|
||||
}
|
||||
|
||||
environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
|
|
|
@ -18,9 +18,6 @@ public class MicrometerConfiguration {
|
|||
@NotEmpty
|
||||
private String apiKey;
|
||||
|
||||
@JsonProperty
|
||||
private String accountId;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -32,8 +29,4 @@ public class MicrometerConfiguration {
|
|||
public String getApiKey() {
|
||||
return apiKey;
|
||||
}
|
||||
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue