spring-boot/spring-boot-samples/spring-boot-sample-actuator
Dave Syer aa2b020660 Refactor metrics to expose richer feature set
Main user-facing interface is still Counter/GaugeService but the
back end behind that has more options. The Default*Services write
metrics to a MetricWriter and there are some variants of that, and
also variants of MetricReader (basic read-only actions).

MetricRepository is now a combination of MetricReader, MetricWriter
and some more methods that make it a bit more repository like.

There is also a MultiMetricReader and a MultiMetricRepository for
the common case where metrics are stored in related (often open
ended) groups. Examples would be complex metrics like histograms
and "rich" metrics with averages and statistics attached (which
are both closed) and "field counters" which count the occurrences
of values of a particular named field or slot in an incoming message
(e.g. counting Twitter hastags, open ended).

In memory and redis implementations are provided for the repositories.
Generally speaking the in memory repository should be used as a
local buffer and then scheduled "exports" can be executed to copy
metric values accross to a remote repository for aggregation.
There is an Exporter interface to support this and a few implementations
dealing with different strategies for storing the results (singly or
grouped).

Codahale metrics are also supported through the MetricWriter interface.
Currently implemented through a naming convention (since Codahale has
a fixed object model this makes sense): metrics beginning with "histogram"
are Histograms, "timer" for Timers, "meter" for Meters etc.

Support for message driven metric consumption and production are provided
through a MetricWriterMessageHandler and a MessageChannelMetricWriter.

No support yet for pagination in the repositories, or for HATEOAS style
HTTP endpoints.
2013-12-30 10:32:42 +00:00
..
src Refactor metrics to expose richer feature set 2013-12-30 10:32:42 +00:00
build.gradle Add build.gradle samples and rename runJar->bootRun 2013-12-10 11:10:04 +00:00
build.xml Add basic build.xml to actuator sample 2013-12-23 14:50:58 +00:00
ivy.xml Add basic build.xml to actuator sample 2013-12-23 14:50:58 +00:00
ivysettings.xml Add basic build.xml to actuator sample 2013-12-23 14:50:58 +00:00
pom.xml Add log4j starter and some documentation 2013-12-16 17:26:53 +00:00
README.md Add build.gradle samples and rename runJar->bootRun 2013-12-10 11:10:04 +00:00
start.groovy Ops -> Actuator 2013-07-31 13:20:26 -07:00

Spring Boot Actuator Sample

You can build this sample using Maven (>3) or Gradle (1.6).

With Maven:

$ mvn package
$ java -jar target/*.jar

Then access the app via a browser (or curl) on http://localhost:8080 (the user name is "user" and look at the INFO log output for the password to login).

With gradle:

$ gradle build
$ java -jar build/libs/*.jar

The gradle build contains an intentionally odd configuration to exclude the security dependencies from the executable JAR. So the app run like this behaves differently than the one run from the Maven-built JAR file. See comments in the build.gradle for details.