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
0dca2dd9
Commit
0dca2dd9
authored
May 22, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small docs tweaks in metrics
parent
b12d7c70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
RedisMetricRepository.java
...tuate/metrics/repository/redis/RedisMetricRepository.java
+5
-2
production-ready-features.adoc
...oot-docs/src/main/asciidoc/production-ready-features.adoc
+8
-1
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMetricRepository.java
View file @
0dca2dd9
...
...
@@ -32,8 +32,11 @@ import org.springframework.util.Assert;
/**
* A {@link MetricRepository} implementation for a redis backend. Metric values are stored
* as regular hash values against a key composed of the metric name prefixed with a
* constant (default "spring.metrics.").
* as zset values plus a regular hash value for the timestamp, both against a key composed
* of the metric name prefixed with a constant (default "spring.metrics."). If you have
* multiple metrics repositories all point at the same instance of Redis, it may be useful
* to change the prefix to be unique (but not if you want them to contribute to the same
* metrics).
*
* @author Dave Syer
*/
...
...
spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
View file @
0dca2dd9
...
...
@@ -658,12 +658,19 @@ http://matt.aimonetti.net/posts/2013/06/26/practical-guide-to-graphite-monitorin
Metric
service
implementations
are
usually
bound
to
a
{
sc
-
spring
-
boot
-
actuator
}/
metrics
/
repository
/
MetricRepository
.{
sc
-
ext
}[`
MetricRepository
`].
A
`
MetricRepository
`
is
responsible
for
storing
and
retrieving
metric
information
.
Spring
Boot
provides
an
`
InMemoryMe
ssage
Respository
`
and
a
`
RedisMetricRepository
`
out
of
the
Boot
provides
an
`
InMemoryMe
tric
Respository
`
and
a
`
RedisMetricRepository
`
out
of
the
box
(
the
in
-
memory
repository
is
the
default
)
but
you
can
also
write
your
own
.
The
`
MetricRepository
`
interface
is
actually
composed
of
higher
level
`
MetricReader
`
and
`
MetricWriter
`
interfaces
.
For
full
details
refer
to
the
{
dc
-
spring
-
boot
-
actuator
}/
metrics
/
repository
/
MetricRepository
.{
dc
-
ext
}[
Javadoc
].
There
's nothing to stop you hooking a `MetricRepository` with back-end storage directly
into your app, but we recommend using the default `InMemoryMetricRespository`
(possibly with a custom `Map` instance if you are worried about heap usage) and
populating a back-end repository through a scheduled export job. In that way you get
some buffering in memory of the metric values and you can reduce the network
chatter by exporting less frequently or in batches. Spring Boot provides
an `Exporter` interface and a few basic implementations for you to get started with that.
[[production-ready-code-hale-metrics]]
...
...
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