Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
8026b2e7
Commit
8026b2e7
authored
Nov 01, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.5.x'
See gh-6982
parents
4e30da35
fe50b201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
24 deletions
+5
-24
MetricRepositoryAutoConfiguration.java
...uate/autoconfigure/MetricRepositoryAutoConfiguration.java
+5
-24
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java
View file @
8026b2e7
...
...
@@ -28,12 +28,8 @@ import org.springframework.boot.actuate.metrics.buffer.GaugeBuffers;
import
org.springframework.boot.actuate.metrics.export.Exporter
;
import
org.springframework.boot.actuate.metrics.export.MetricCopyExporter
;
import
org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository
;
import
org.springframework.boot.actuate.metrics.repository.MetricRepository
;
import
org.springframework.boot.actuate.metrics.writer.MetricWriter
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava.JavaVersion
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava.Range
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -44,12 +40,11 @@ import org.springframework.messaging.MessageChannel;
* user-facing {@link GaugeService} and {@link CounterService} instances, and also back
* end repositories to catch the data pumped into them.
* <p>
* An {@link InMemoryMetricRepository} is always created unless another
* {@link MetricRepository} is already provided by the user. In general, even if metric
* data needs to be stored and analysed remotely, it is recommended to use an in-memory
* repository to buffer metric updates locally. The values can be exported (e.g. on a
* periodic basis) using an {@link Exporter}, most implementations of which have
* optimizations for sending data to remote repositories.
* In general, even if metric data needs to be stored and analysed remotely, it is
* recommended to use in-memory storage to buffer metric updates locally as is done by the
* default {@link CounterBuffers} and {@link GaugeBuffers}. The values can be exported
* (e.g. on a periodic basis) using an {@link Exporter}, most implementations of which
* have optimizations for sending data to remote repositories.
* <p>
* If Spring Messaging is on the classpath and a {@link MessageChannel} called
* "metricsChannel" is also available, all metric update events are published additionally
...
...
@@ -115,18 +110,4 @@ public class MetricRepositoryAutoConfiguration {
}
}
@Configuration
@ConditionalOnJava
(
value
=
JavaVersion
.
EIGHT
,
range
=
Range
.
OLDER_THAN
)
@ConditionalOnMissingBean
(
name
=
"actuatorMetricRepository"
)
static
class
LegacyMetricRepositoryConfiguration
{
@Bean
@ExportMetricReader
@ActuatorMetricWriter
public
InMemoryMetricRepository
actuatorMetricRepository
()
{
return
new
InMemoryMetricRepository
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment