Commit a7b13dbe authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #13819 from jkschneider:micrometer-1.0.6

* pr/13819:
  Polish "Upgrade to Micrometer 1.0.6"
  Upgrade to Micrometer 1.0.6
parents dcb68d4c ecb8da25
......@@ -57,6 +57,25 @@ public class InfluxProperties extends StepRegistryProperties {
*/
private String retentionPolicy;
/**
* Time period for which Influx should retain data in the current database. For
* instance 7d, check the influx documentation for more details on the duration
* format.
*/
private String retentionDuration;
/**
* How many copies of the data are stored in the cluster. Must be 1 for a single node
* instance.
*/
private Integer retentionReplicationFactor;
/**
* Time range covered by a shard group. For instance 2w, check the influx
* documentation for more details on the duration format.
*/
private String retentionShardDuration;
/**
* URI of the Influx server.
*/
......@@ -113,6 +132,30 @@ public class InfluxProperties extends StepRegistryProperties {
this.retentionPolicy = retentionPolicy;
}
public String getRetentionDuration() {
return this.retentionDuration;
}
public void setRetentionDuration(String retentionDuration) {
this.retentionDuration = retentionDuration;
}
public Integer getRetentionReplicationFactor() {
return this.retentionReplicationFactor;
}
public void setRetentionReplicationFactor(Integer retentionReplicationFactor) {
this.retentionReplicationFactor = retentionReplicationFactor;
}
public String getRetentionShardDuration() {
return this.retentionShardDuration;
}
public void setRetentionShardDuration(String retentionShardDuration) {
this.retentionShardDuration = retentionShardDuration;
}
public String getUri() {
return this.uri;
}
......
......@@ -60,6 +60,24 @@ class InfluxPropertiesConfigAdapter extends
InfluxConfig.super::retentionPolicy);
}
@Override
public Integer retentionReplicationFactor() {
return get(InfluxProperties::getRetentionReplicationFactor,
InfluxConfig.super::retentionReplicationFactor);
}
@Override
public String retentionDuration() {
return get(InfluxProperties::getRetentionDuration,
InfluxConfig.super::retentionDuration);
}
@Override
public String retentionShardDuration() {
return get(InfluxProperties::getRetentionShardDuration,
InfluxConfig.super::retentionShardDuration);
}
@Override
public String uri() {
return get(InfluxProperties::getUri, InfluxConfig.super::uri);
......
......@@ -32,6 +32,7 @@ public class SignalFxPropertiesConfigAdapter
public SignalFxPropertiesConfigAdapter(SignalFxProperties properties) {
super(properties);
accessToken(); // validate that an access token is set
}
@Override
......
......@@ -39,6 +39,12 @@ public class InfluxPropertiesTests extends StepRegistryPropertiesTests {
assertThat(properties.getUserName()).isEqualTo(config.userName());
assertThat(properties.getPassword()).isEqualTo(config.password());
assertThat(properties.getRetentionPolicy()).isEqualTo(config.retentionPolicy());
assertThat(properties.getRetentionDuration())
.isEqualTo(config.retentionDuration());
assertThat(properties.getRetentionReplicationFactor())
.isEqualTo(config.retentionReplicationFactor());
assertThat(properties.getRetentionShardDuration())
.isEqualTo(config.retentionShardDuration());
assertThat(properties.getUri()).isEqualTo(config.uri());
assertThat(properties.isCompressed()).isEqualTo(config.compressed());
assertThat(properties.isAutoCreateDb()).isEqualTo(config.autoCreateDb());
......
......@@ -122,7 +122,7 @@
<logback.version>1.2.3</logback.version>
<lombok.version>1.16.22</lombok.version>
<mariadb.version>2.2.6</mariadb.version>
<micrometer.version>1.0.5</micrometer.version>
<micrometer.version>1.0.6</micrometer.version>
<mockito.version>2.15.0</mockito.version>
<mongo-driver-reactivestreams.version>1.7.1</mongo-driver-reactivestreams.version>
<mongodb.version>3.6.4</mongodb.version>
......
......@@ -1371,7 +1371,10 @@ content into your application. Rather, pick only the properties that you need.
management.metrics.export.influx.num-threads=2 # Number of threads to use with the metrics publishing scheduler.
management.metrics.export.influx.password= # Login password of the Influx server.
management.metrics.export.influx.read-timeout=10s # Read timeout for requests to this backend.
management.metrics.export.influx.retention-duration= # Time period for which Influx should retain data in the current database.
management.metrics.export.influx.retention-shard-duration= # Time range covered by a shard group.
management.metrics.export.influx.retention-policy= # Retention policy to use (Influx writes to the DEFAULT retention policy if one is not specified).
management.metrics.export.influx.retention-replication-factor= # How many copies of the data are stored in the cluster.
management.metrics.export.influx.step=1m # Step size (i.e. reporting frequency) to use.
management.metrics.export.influx.uri=http://localhost:8086 # URI of the Influx server.
management.metrics.export.influx.user-name= # Login user of the Influx server.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment