Skip to content

Commit b191974

Browse files
committed
Reflect Java 7/8 differences in javadoc for metric repository auto-config
Closes gh-6985
1 parent ae4b8dc commit b191974

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import org.springframework.boot.actuate.metrics.export.Exporter;
2929
import org.springframework.boot.actuate.metrics.export.MetricCopyExporter;
3030
import org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository;
31-
import org.springframework.boot.actuate.metrics.repository.MetricRepository;
3231
import org.springframework.boot.actuate.metrics.writer.DefaultCounterService;
3332
import org.springframework.boot.actuate.metrics.writer.DefaultGaugeService;
3433
import org.springframework.boot.actuate.metrics.writer.MetricWriter;
@@ -46,12 +45,12 @@
4645
* user-facing {@link GaugeService} and {@link CounterService} instances, and also back
4746
* end repositories to catch the data pumped into them.
4847
* <p>
49-
* An {@link InMemoryMetricRepository} is always created unless another
50-
* {@link MetricRepository} is already provided by the user. In general, even if metric
51-
* data needs to be stored and analysed remotely, it is recommended to use an in-memory
52-
* repository to buffer metric updates locally. The values can be exported (e.g. on a
53-
* periodic basis) using an {@link Exporter}, most implementations of which have
54-
* optimizations for sending data to remote repositories.
48+
* In general, even if metric data needs to be stored and analysed remotely, it is
49+
* recommended to use in-memory storage to buffer metric updates locally as is done by the
50+
* default {@link InMemoryMetricRepository} (Java 7) or {@link CounterBuffers} and
51+
* {@link GaugeBuffers} (Java 8). The values can be exported (e.g. on a periodic basis)
52+
* using an {@link Exporter}, most implementations of which have optimizations for sending
53+
* data to remote repositories.
5554
* <p>
5655
* If Spring Messaging is on the classpath and a {@link MessageChannel} called
5756
* "metricsChannel" is also available, all metric update events are published additionally

0 commit comments

Comments
 (0)