|
18 | 18 |
|
19 | 19 | import java.time.Duration;
|
20 | 20 |
|
21 |
| -import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties; |
22 | 21 | import org.springframework.boot.context.properties.ConfigurationProperties;
|
23 | 22 |
|
24 | 23 | /**
|
|
30 | 29 | * @since 2.0.0
|
31 | 30 | */
|
32 | 31 | @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); |
34 | 53 |
|
35 | 54 | /**
|
36 | 55 | * Number of threads to use with the metrics publishing scheduler.
|
37 | 56 | */
|
38 | 57 | private Integer numThreads = 4;
|
39 | 58 |
|
| 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 | + |
40 | 65 | /**
|
41 | 66 | * URI of the Atlas server.
|
42 | 67 | */
|
@@ -73,16 +98,54 @@ public class AtlasProperties extends StepRegistryProperties {
|
73 | 98 | */
|
74 | 99 | private String evalUri = "http://localhost:7101/lwc/api/v1/evaluate";
|
75 | 100 |
|
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 | + |
77 | 133 | public Integer getNumThreads() {
|
78 | 134 | return this.numThreads;
|
79 | 135 | }
|
80 | 136 |
|
81 |
| - @Override |
82 | 137 | public void setNumThreads(Integer numThreads) {
|
83 | 138 | this.numThreads = numThreads;
|
84 | 139 | }
|
85 | 140 |
|
| 141 | + public Integer getBatchSize() { |
| 142 | + return this.batchSize; |
| 143 | + } |
| 144 | + |
| 145 | + public void setBatchSize(Integer batchSize) { |
| 146 | + this.batchSize = batchSize; |
| 147 | + } |
| 148 | + |
86 | 149 | public String getUri() {
|
87 | 150 | return this.uri;
|
88 | 151 | }
|
|
0 commit comments