Commit Graph

784 Commits (1d31d23e29424ebd8501197c63fb168d1cc942a8)

Author SHA1 Message Date
Phillip Webb e8085016ba Polish Actuator hypermedia support 10 years ago
izeye 99cd9bdc31 Fix typo
Closes gh-3416
10 years ago
izeye b4f636b33f Fix typo
Closes gh-3411
10 years ago
Dave Syer 74e9e0749b Add support for Spring HATEOAS hypermedia in Actuator endpoints
If spring-hateoas is on the classpath and an MvcEndpoint returns a
@ResponseBody it will be extended and wrapped into a Resource with links.
All the existing endpoints that return sensible JSON data can be extended
this way (i.e. not /logfile). The HAL browser will also be added as an
endpoint if available on the classpath. Finally, asciidocs for the
Actuator endpoints are available as a separate jar file, which if
included in an app will also generate a new (HTTP) endpoint.

Fixes gh-1390
10 years ago
Spring Buildmaster 7ce391db4f Next development version 10 years ago
Phillip Webb b1f8a692a8 Merge branch '1.2.x' 10 years ago
Phillip Webb 3ef667f0d8 Fix MetricWriterMessageHandler to deal with reset
Update MetricWriterMessageHandler to deal with 'reset' messages and to
log unsupported payload types.

Fixes gh-3378
10 years ago
Phillip Webb d61c38167e Formatting 10 years ago
Dave Syer 5541b3be43 Remove @OnManagementMvcCondition and use a private class
Fixes gh-3373
10 years ago
Phillip Webb b5c435f8c4 Polish Actuator MVC customization support
See gh-3345
10 years ago
Dave Syer 1e464da248 Refactor the Actuator MVC configuration to allow more customization
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.

Fixes gh-3345
10 years ago
Phillip Webb b68382f3ba Polish 10 years ago
Dave Syer 1f6ac52b96 Change default behaviour of /health when not secured
The default is now to reveal all details unless sensitive=true
(instead of only revealing then if sensitive was explicitly false).
The definition of "secure" also changes to something more sensible
where it is only true if security is enabled.

Fixes gh-2816
10 years ago
Dave Syer c3c1d91f74 Fix Redis metrics default settings
The default should be to generate a key from the prefix. Otherwise
if user sets the prefix and not the key it can pick up metrics from
another repository (which is what happens in the tests).
10 years ago
Stephane Nicoll 12767a43e2 Remove unnecessary import
See gh-3335
10 years ago
izeye 761c985337 Remove unnecessary `@After` callback
`@After` callback was trying to remove the wrong file anyway. This is
now taken care of by the `TemporaryFolder` rule.

Closes gh-3335
10 years ago
Stephane Nicoll 56b13800ae Fix json structure 10 years ago
Phillip Webb 134bc02404 Extract common metric Buffer code
Extract common features from CounterBuffers and GuageBuffers into
a shared superclass. The new extracted types allows the service
implementations to be simplified.

Fixes gh-3257
10 years ago
Stephane Nicoll 41b4d41f11 Remove dead code 10 years ago
Stephane Nicoll e9baa779cc Remove dead code 10 years ago
Johannes Stelzer 308a5eaff5 Add /logfile MVC actuator endpoint
Add a `/logfile` endpoint which can be used to fetch the contents of
the log file (if one is being used).

Fixes gh-2137
Closes gh-2294
10 years ago
Phillip Webb 61fc4f3f12 Polish copyright headers 10 years ago
Stephane Nicoll d0698bd8ed Remove unnecessary System.out in tests 10 years ago
Tomasz Przybyła becced5f0b Add `spring.pid.fail-on-write-error` support
Update `ApplicationPidFileWriter` to support a 'fail on write error'
properties which allows the user to exit the application if the PID
file cannot be written.

This commit also deprecates `spring.pidfile` in favor of
`spring.pid.file` so that the new property can be added without overlap.

Fixes gh-2764
10 years ago
Andy Wilkinson d3d713d0c9 Merge branch '1.2.x' 10 years ago
olivier bourgain 5ed2a9632b Make InMemoryTraceRepository thread-safe
Closes gh-3027
10 years ago
Phillip Webb 2f16a01dd5 Polish 10 years ago
dgomesbr 1ebbf8ac4d Upgrade to Hazelcast 3.5
Closes gh-3267
Closes gh-3272
10 years ago
Stephane Nicoll 7ed1aa279a Add Informix specific health query
Closes gh-1287
10 years ago
Johannes Stelzer ea2a09cbf6 Add DB2 specific health query
Closes gh-2565
10 years ago
Stephane Nicoll fd5d6ef303 Polish 10 years ago
nlejeune 205c86f54c Better sanitizer default for sensitive keys
Add the CloudFoundry vcap_services key, as well as a regular expression
to sanitize any key containing the word 'credentials'.

Fixes gh-3248
Closes gh-3266
10 years ago
Stephane Nicoll c177a774a5 Provide seamless support for local.server.port
Previously, the actual HTTP port on which a web application is running on
was only exposed in tests. This commit makes sure to provide that feature
regardless of the environment so that applications can know on which port
they are actually running on.

If there are several containers, each is exposed via the namespace of
their respective application context.

Closes gh-3259
10 years ago
Phillip Webb 8b9c38085a Merge pull request #3117 from izeye/metrics
* metrics2:
  Remove duplicate code in new metrics code
10 years ago
izeye b47634176f Remove duplicate code in new metrics code
Refactor BufferMetricReader, CounterBuffers and GaugeBuffers to reduce
duplicate code.

Closes gh-3117
10 years ago
izeye de91dc0de7 Change Codahale to Dropwizard in Javadoc. 10 years ago
Phillip Webb af5338f26e Formatting 10 years ago
Stephane Nicoll 8c7b8afedb Polish 10 years ago
izeye 2b9775d593 Fix EhCache hit/miss ratio
The hitRatio is the ratio of two windowed rates that are calculated
independently. They are not updated or read transactionally, hence the
ratio of the two can drift slightly from what might be expected.

We now make sure that the hit or miss ratio can't be higher than 1

Closes gh-3235
10 years ago
Stephane Nicoll 641ceca3a9 Lower logging level of audit events
Closes gh-3107
10 years ago
Andy Wilkinson f73d86e700 Upgrade to Elasticsearch 1.5.2
Closes gh-3194
10 years ago
Stephane Nicoll be26cba01e Merge branch '1.2.x' 10 years ago
Stephane Nicoll 5a57913732 Tune spring-boot-actuator logging config
Closes gh-3060
10 years ago
Phillip Webb 7609c43685 Switch Javadoc <code>...</code> to {@code ...}
Update Javadoc to use the {@code ...} syntax when possible.
10 years ago
Phillip Webb 6230d905c6 Polish 10 years ago
Stephane Nicoll 9b5e5f7bf8 Fix Javadoc 10 years ago
Eddú Meléndez baca62a6c0 Fix typos 10 years ago
Dave Syer cc169c5009 Change the way the AggregateMetricReader works to make it easier
for users to get started. It also makes it more flexible if different
aggregation keys are needed depending on the environment. The most
important new feature is the
spring.metrics.export.redis.aggregateKeyPattern configuration, which
fits the *.redis.key and prefix defaults. The aggregate reader uses
a prefix based on the key by default, with a naming convention that
the key starts with "keys.".
10 years ago
Phillip Webb 683c19ee8b Polish 10 years ago
Stephane Nicoll f6115a0713 polish
Closes gh-3110
10 years ago
izeye 5096a5d242 Remove duplicate in MetricExportProperties
Closes gh-3109
10 years ago
Dave Syer 6c653038f6 Remove getDefault() from MetricExportProperties
Fixes gh-3112
10 years ago
Dave Syer c108b1483a Restore and deprecate DropwizardMetricWriter
Fixes gh-3113
10 years ago
Phillip Webb 31d6a0f17a Polish updated metrics code 10 years ago
Phillip Webb d2f11c465e Polish cache code 10 years ago
Phillip Webb 412b7b9e50 Polish 10 years ago
Spring Buildmaster 5d81c87b43 Next Development Version 10 years ago
Phillip Webb 4a097f8550 Merge branch '1.2.x' 10 years ago
Phillip Webb df0ba5c03a Guard against metric failures in MetricsFilter
Update MetricsFilter so that failures to record metrics are logged and
ignored.

Fixes gh-2777
10 years ago
Phillip Webb 49c4710f63 Merge branch '1.2.x' 10 years ago
Phillip Webb 1d5a62b3df Show `endpoint.isEnabled` in `/configprops`
Update `ConfigurationPropertiesReportEndpoint` so that properties that
are set with a Boolean class but read with a boolean primitive still
appear in the report. The allows the Endpoint.isEnabled() property to
be displayed.

Fixes gh-2929
10 years ago
Phillip Webb aaa2ff54dd Extract @ConditionalOnEnabledEndpoint
Extract @ConditionalOnEnabledEndpoint to a top level class.

See gh-2798
10 years ago
Phillip Webb 968b68c322 Polish 10 years ago
Stephane Nicoll 18d7634947 Add basic cache metrics support for Infinispan
Closes gh-3066
10 years ago
Stephane Nicoll 28d2955d03 Fix Hazelcast cache statistics condition
Make sure the Hazelcast statistics support is not triggered if the Spring
support is not present. The Hazelcast dependency alone may be used with
JCache and this should not trigger the support of the native Hazelcast
metrics infra.

See gh-2633
10 years ago
Dave Syer 33f06e1cb0 Ensure redis export properties are actually set using a @Value()
Previously the @Value annotation was not on a top level @Bean field
(it was nested inside). Manually constructing the bean in a separate
configuration class seems like the best way to get it to actually bind
at runtime.
10 years ago
Dave Syer 8a83bd12bd Refactor annotations for metric export
Users can add @ExportMetric[Reader,Writer] to readers and writers that
they want to participate in the default exporter. There is also still an
@ActuatorMetricWriter that is used for the legacy (non-Java8) Gauge and
CounterServices.
10 years ago
Dave Syer 80ff92919c Add redis properties as convenience in spring.metrics.export
The redis export and aggregate use case is a lot nicer with this
shared data between the two component types.

Also made MetricExportProperties itself a Trigger (so the default
delay etc. can be configured via spring.metrics.export.*).
10 years ago
Dave Syer a49901f0dc Tweak conditions on metric export to make it easier to override 10 years ago
izeye 8f0fd21f11 Fix redudant assertion in test
Closes gh-3064
10 years ago
izeye 88612393f3 Fix allowCredentials property handling
Closes gh-3059
10 years ago
Andreas Ahlenstorf 9805643e41 Fix spring-security versions
Closes gh-3050
10 years ago
Stephane Nicoll a6f671be3e Add excludeName to EnableAutoConfiguration
Allow user to exclude an auto-configuration class by specifying the fully
qualified name instead of the class reference.

Closes gh-2660
10 years ago
Stephane Nicoll fc61f2e837 Improve documentation for JMX related keys
Closes gh-2747
10 years ago
Stephane Nicoll ab55331863 Improve configuration keys documentation 10 years ago
Dave Syer 5468949a55 Update to latest 1.3 code 10 years ago
Andy Wilkinson 3eb5c348fb Align test with Spring MVC's internals once again
The internals have been updated so that the field that was originally
used, interceptors, can be used again.

This reverts commit 2a1bca6806.
10 years ago
Andy Wilkinson 2a1bca6806 Update field that’s checked reflectively to match Spring MVC’s internals 10 years ago
Andy Wilkinson 129c24926e Fix metrics speed tests on Windows
Write to NUL on Windows and /dev/null on other platforms. Increase the
default number of iterations to avoid problems with the reduced timing
precision on Windows.

Closes gh-2976
10 years ago
Andy Wilkinson a0c0822293 Use array of correct size when turning List<MetricReader> into an array 10 years ago
Andy Wilkinson 54b0613179 Gracefully handle null readers in MetricExportAutoConfiguration 10 years ago
Dave Syer 20cea2aefc Remove duplicate declaration of s-i-core 10 years ago
Dave Syer a065b80e57 Add MetricsEndpointMetricReader for exporting all metrics
User can add a bean of type MetricsEndpointMetricReader to opt in
to exporting all metrics via the MetricsEndpoint (instead of via
MetricReaders). There are disadvantages (like no accurate timestamps)
so it's best to leave it as an opt in.

Also improved tests for metric auto configuration a bit.
10 years ago
Dave Syer 5ceb35473d Allow multiple readers/writers to be @ActuatorMetric*
In principle you might have multiple "system" repositories, all
of which you want to go to public metrics or not be metrics exporters.
This change adds a new annotation and renames the old one, so that
reades and writers can be distinguished, and also changes the
autowiring of them to accept multiple values.

Also adds automatic public metrics for Spring Integration.
10 years ago
Stephane Nicoll 80ecb8220d Add explicit dependency to CacheAutoConfiguration
Make sure that the cache statistics auto-configuration is evaluated after
the cache auto-configuration itself.

See gh-2633
10 years ago
Stephane Nicoll d63d2dded8 polish
Improve documentation of cors settings.

See gh-2936
10 years ago
Andy Wilkinson b45a2bcfc0 Update javadoc following removal of deprecated APIs
See gh-2697
10 years ago
Andy Wilkinson e3a53cb087 Remove classes and methods deprecated since 1.2 and earlier
Closes gh-2697
10 years ago
Andy Wilkinson 84d3a34c49 Add CORS support to the actuator’s endpoints
This commit adds CORS support to the Actuator’s MVC endpoints. CORS
support is disabled by default and is only enabled once the
endpoints.cors.allowed-origins property has been set.

The new properties to control the endpoints’ CORS configuration are:

endpoints.cors.allow-credentials
endpoints.cors.allowed-origins
endpoints.cors.allowed-methods
endpoints.cors.allowed-headers
endpoints.cors.exposed-headers

The changes to enable Jolokia-specific CORS support (57a51ed) have been
reverted as part of this commit. This provides a consistent approach
to CORS configuration across all endpoints, rather than Jolokia using
its own configuration.

See gh-1987
Closes gh-2936
10 years ago
Dave Syer 64af3272a1 Extract metric export into a separate autoconfig class
This avoids a potential problems with ordering between Dropwizard and
normal repository configuration. A Dropwizard sample has been added to
verify the behaviour.
10 years ago
Dave Syer 7be13b28bd Add tests for new features 10 years ago
Dave Syer 270d5e3205 Add @ActuatorMetricRepository to qualify the "native" repository
Primarily when it is needed for metric export.
10 years ago
Dave Syer 2f2750e713 Extract metric writers into a MetricExporters composite
Adds a separate exporter per MetricWriter and allows individual
configuration of exporters for fine-grained control of schedules
and patterns etc.
10 years ago
Dave Syer 0ce72105b9 Add JMX to Redis sample 10 years ago
Dave Syer 089b1d05dc Add support for sendLatest=true/false in exporter
Also fix bug in includes/excludes
10 years ago
Dave Syer 3fda744522 Add samples and tweak metrics reader/writers till they work 10 years ago
Dave Syer 60a4943520 Add support for metric export to OpenTSDB 10 years ago
Dave Syer a32c530c36 Add @Primary to default InMemoryMetricRepository if there is one 10 years ago
Dave Syer 2aaf556a1c Ensure the default MetricWriter in Java 7 is not used in exporter 10 years ago
Dave Syer 0bd845d183 Add support for Statsd metric export 10 years ago