Skip to content

Commit 72f2afe

Browse files
committed
Merge branch '2.2.x'
Closes gh-20844
2 parents bb568c5 + 4641794 commit 72f2afe

File tree

1 file changed

+67
-4
lines changed
  • spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas

1 file changed

+67
-4
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasProperties.java

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.time.Duration;
2020

21-
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
2221
import org.springframework.boot.context.properties.ConfigurationProperties;
2322

2423
/**
@@ -30,13 +29,39 @@
3029
* @since 2.0.0
3130
*/
3231
@ConfigurationProperties(prefix = "management.metrics.export.atlas")
33-
public class AtlasProperties extends StepRegistryProperties {
32+
public class AtlasProperties {
33+
34+
/**
35+
* Step size (i.e. reporting frequency) to use.
36+
*/
37+
private Duration step = Duration.ofMinutes(1);
38+
39+
/**
40+
* Whether exporting of metrics to this backend is enabled.
41+
*/
42+
private boolean enabled = true;
43+
44+
/**
45+
* Connection timeout for requests to this backend.
46+
*/
47+
private Duration connectTimeout = Duration.ofSeconds(1);
48+
49+
/**
50+
* Read timeout for requests to this backend.
51+
*/
52+
private Duration readTimeout = Duration.ofSeconds(10);
3453

3554
/**
3655
* Number of threads to use with the metrics publishing scheduler.
3756
*/
3857
private Integer numThreads = 4;
3958

59+
/**
60+
* Number of measurements per request to use for this backend. If more measurements
61+
* are found, then multiple requests will be made.
62+
*/
63+
private Integer batchSize = 10000;
64+
4065
/**
4166
* URI of the Atlas server.
4267
*/
@@ -73,16 +98,54 @@ public class AtlasProperties extends StepRegistryProperties {
7398
*/
7499
private String evalUri = "http://localhost:7101/lwc/api/v1/evaluate";
75100

76-
@Override
101+
public Duration getStep() {
102+
return this.step;
103+
}
104+
105+
public void setStep(Duration step) {
106+
this.step = step;
107+
}
108+
109+
public boolean isEnabled() {
110+
return this.enabled;
111+
}
112+
113+
public void setEnabled(boolean enabled) {
114+
this.enabled = enabled;
115+
}
116+
117+
public Duration getConnectTimeout() {
118+
return this.connectTimeout;
119+
}
120+
121+
public void setConnectTimeout(Duration connectTimeout) {
122+
this.connectTimeout = connectTimeout;
123+
}
124+
125+
public Duration getReadTimeout() {
126+
return this.readTimeout;
127+
}
128+
129+
public void setReadTimeout(Duration readTimeout) {
130+
this.readTimeout = readTimeout;
131+
}
132+
77133
public Integer getNumThreads() {
78134
return this.numThreads;
79135
}
80136

81-
@Override
82137
public void setNumThreads(Integer numThreads) {
83138
this.numThreads = numThreads;
84139
}
85140

141+
public Integer getBatchSize() {
142+
return this.batchSize;
143+
}
144+
145+
public void setBatchSize(Integer batchSize) {
146+
this.batchSize = batchSize;
147+
}
148+
86149
public String getUri() {
87150
return this.uri;
88151
}

0 commit comments

Comments
 (0)