Commit Graph

827 Commits

Author SHA1 Message Date
Phillip Webb 690da89c82 Fix warnings 2015-09-05 00:21:09 -07:00
Phillip Webb 60b8cb8a47 Fix package tangle in spring-boot-actuator
Introduce ManagementServletContext interface as a facade for
ManagementServerProperties to resolve the package tangle between
`o.s.boot.actuate.endpoint.mvc` and `o.s.boot.actuate`

Fixes gh-3887
2015-09-03 14:19:43 -07:00
Phillip Webb 6193b640a4 Polish 2015-09-02 23:44:19 -07:00
Andy Wilkinson 1f202e3e47 Upgrade to HAL Browser 9f96c74
Closes gh-3880
2015-09-02 18:03:07 +01:00
Stephane Nicoll 8f520dafc7 Remove hard-coded list of values in description
Since the meta-data now provide an explicit support for value hints, we
should not copy/paste them in the description as the IDE is able to
process them any way it wants.

Closes gh-3863
2015-09-02 12:02:35 +02:00
izeye 3ec97c1bb9 Make metric type more sensible
Closes gh-3532
2015-08-27 14:15:07 +02:00
izeye e2119d3329 Fix typos
Closes gh-3809
2015-08-23 09:24:00 +02:00
Dave Syer 9303efd435 Allow counter names like counter-foo
Checking for a prefix "counter." is more correct than "counter" because
the readers (repositories) assume the former prefix is there.

Fixes gh-3801
2015-08-21 08:37:47 +01:00
Stephane Nicoll 7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
2015-08-19 17:09:34 +02:00
Stephane Nicoll a6f8586270 Merge branch '1.2.x'
Conflicts:
	spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java
2015-08-17 10:15:52 +02:00
Stephane Nicoll 11b82cc6fe Properly guard DB health indicator
The DataSource health indicator uses `JdbcTemplate` behind the scenes
but nothing was checking that it is actually available.

`DataSourcesHealthIndicatorConfiguration` is now disabled if
`spring-jdbc` is not on the classpath.

Fixes gh-3765
2015-08-17 10:08:07 +02:00
Dave Syer 56115b9baa Fix broken test (use web app context) 2015-08-12 08:43:13 +01:00
Dave Syer 84a3e3827b Ensure tomcat on the classpath does not imply web application 2015-08-11 09:34:20 +01:00
Stephane Nicoll 9d2d34216b Remove references to endpoints.hal
See gh-3696
2015-08-11 09:14:40 +02:00
Andy Wilkinson dad0574fd5 In absence of HAL browser, serve browsers JSON from actuator entry point
Following the changes made to combines the /links and /hal endpoints
into a single /actuator endpoint, a web browser accessing /actuator
would receive a 406 response if HAL browser was not on the classpath.

This commit updates the /actuator main entry point so that it will
serve JSON to a web browser when HAL browser is not on the classpath.

The actuator's embedded documentation has also been updated to reflect
the recent changes.

Closes gh-3696
2015-08-10 16:02:33 +01:00
Andy Wilkinson 25709385e6 Update Hypermedia samples following /hal and /links being combined
See gh-3696
2015-08-10 14:21:22 +01:00
Andy Wilkinson 58db5a3889 Combine /links and /hal into a single /actuator endpoint
This commit provides a single endpoint, /actuator, that serves HTML
(the HAL browser) or JSON depending on the request’s accept header
that enables discovery of all of the actuator’s other endpoints.

When the management context path is configured, the /actuator endpoint
moves to the configured path, e.g. if the management context path is
set to /management, the actuator endpoint will be available from
/management.

Closes gh-3696
2015-08-10 11:40:35 +01:00
Phillip Webb 28f32da74f Don't user root path for HAL endpoints
Update LinksMvcEndpoint and HalBrowserMvcEndpoint so that no longer try
to use the `/` context path. Links are now available from `/links` and
the HAL browser is available from `/hal`.

The actuator HAL browser now works with either WebJars or the Spring
Data version. It also now transforms the initial HTML so that the
form is pre-populated with `/links`.

When using Spring Data's HAL browser, the root includes a link to
`/links` with a rel of `actuator`.

See gh-3621
2015-08-06 00:29:00 -07:00
Phillip Webb 44aacd9559 Polish 2015-08-06 00:25:18 -07:00
Phillip Webb 8d92236eea Polish 2015-08-05 12:09:23 -07:00
Stephane Nicoll c25c07dfdd Remove dead code
ConfigurationPropertiesReportEndpoint parses the meta-data to inspect
entities that have potential cycles in them. The whole logic is based on
the lookup of `META-INF/spring-configuration-metadata.json` files on the
classpath. Unfortunately, the lookup instruction had a typo and did not
retrieve any file.

Surely that code was written with a clear intention in mind but it was
effectively dead code outside tests so it has been removed.

Closes gh-3310
2015-08-05 09:53:51 +02:00
Stephane Nicoll 7c9f2ae19c Polish
See gh-3555
2015-08-05 03:53:13 +02:00
Arthur Kalimullin b7b6e84d4b Add firebird specific health query
Closes gh-3555
2015-08-05 03:53:03 +02:00
Stephane Nicoll bf0b857357 polish 2015-08-04 10:56:23 +02:00
Phillip Webb 891dd5a0f6 Polish 2015-08-03 11:03:48 -07:00
Stephane Nicoll b569918db1 Add property to disable default health indicators
Add a "management.health.defaults.enabled" property that controls whether
the default health indicators are enabled. This allow to disable them all
by default and still enable individual ones using their respective
specific property.

Closes gh-2298
2015-08-03 14:26:12 +02:00
Stephane Nicoll d3e15805b4 Polish 2015-08-03 09:31:26 +02:00
Dave Syer 6d2af95d59 Allow path with / in JolokiaMvcEndpoint
See gh-3629
2015-07-31 15:35:52 +01:00
Dave Syer ff7717932a Weed out duplicate links if there are 2 endpoints with the same path
Fixes gh-3570
2015-07-31 14:55:46 +01:00
arghya88 6e71af2d21 Fix copyright date
Closes gh-3632
2015-07-31 10:19:46 +02:00
Stephane Nicoll 4a327dc08b Add missing meta-data
Closes gh-3620
2015-07-30 10:39:51 +02:00
Stephane Nicoll a90970060d Polish 2015-07-30 09:40:25 +02:00
Stephane Nicoll e32efc179c Polish 2015-07-30 09:39:51 +02:00
Stephane Nicoll 41bc3b386e Rename ManagementSecurityAutoConfiguration
Since `ManagementSecurityAutoConfiguration` is cnfiguring web-related
things, it has been renamed to `ManagementWebSecurityAutoConfiguration`.

Closes gh-2163
2015-07-28 15:20:59 +02:00
Stephane Nicoll 42e230192f Polish 2015-07-24 07:19:53 +02:00
izeye cb0c6843d2 Remove default paths in HAL and Links endpoints as value varies
The default values of fields in @ConfigurationProperties classes are,
where possible, included in the configuration metadata. The default
values for the HAL and Links endpoints vary depending on other
configuration settings. As a result, including a default in the
metadata is misleading.

This commit removes the default assignment of "" to the path fields so
that no default value will be included in the metadata.

Closes gh-3567
2015-07-23 10:32:25 +01:00
Stephane Nicoll 16dac01886 Polish 2015-07-22 15:18:23 +02:00
Phillip Webb 5d74ea2861 Merge branch '1.2.x' 2015-07-20 10:05:17 -07:00
Phillip Webb d2d71934b6 Polish 2015-07-20 10:04:28 -07:00
Stephane Nicoll 3e26273013 Polish 2015-07-20 15:38:42 +02:00
Stephane Nicoll 43c5151ee1 Merge branch '1.2.x' 2015-07-20 10:57:09 +02:00
Stephane Nicoll 539b009d12 Clean management context path if necessary
Various areas of the code expect the management's context path to not
contain any trailing slash but nothing is enforcing it. We now make sure
to remove any trailing slash, including the one for '/' and make that
explicit via the Javadoc of the getter.

Fixes gh-3553
2015-07-20 10:56:52 +02:00
Phillip Webb 728e64b929 Polish 2015-07-16 12:56:49 -07:00
Andy Wilkinson bedf2edffa Update auto-configuration @Bean methods to return most specific type
Closes gh-2536
Closes gh-2403
2015-07-15 19:00:56 +01:00
Stephane Nicoll f2d32d3e98 Add support for property deprecation
Previously, an item could only have a 'deprecated' boolean flag to
indicate that the property is deprecated. It is desirable to provide an
additional description for the deprecation as well as the name of the
property to use instead.

The `deprecated` boolean flag is now supported. Instead, a `deprecated`
object can be specified with two optional attributes: `reason` to provide
an explanation for the deprecation and `replacement` to refer to the
property that should be used instead. If none of them is present, an
empty deprecation object should be set.

For backward compatibility, the `deprecated` field is still set.

Deprecation information can only set via manual meta-data.

Closes gh-3449
2015-07-15 15:41:52 +02:00
Dave Syer de95012635 Workaround problems with order of endpoint handler mapping
When Spring Data REST is owning the home page it has its own
HandlerMapping with a fix (relatively) low priority. The /links
endpoint wants to own the home page as well, and our handler mapping
has a high priority for good reasons. This change addresses the
issue by checking if Spring Data REST is configured and if
the management context path (or  more specifically, the links
endpoint) is the same as the home page.

Fixes gh-3486
2015-07-15 11:45:25 +01:00
Phillip Webb fd6024ebf1 Move and refactor Redis test server @Rule
Move the Redis JUnit @Rule so that it can be used with
SessionAutoConfigurationTests. Also refactored the internals a little.
2015-07-13 11:52:42 -07:00
Phillip Webb 9ebe15232e Polish 2015-07-13 11:05:46 -07:00
Phillip Webb 6fdcdd888b Merge branch '1.2.x' 2015-07-13 10:18:40 -07:00
Phillip Webb dc18d8d1bb Formatting 2015-07-13 10:17:53 -07:00
Dave Syer e5d3fa0c6c Merge remote-tracking branch '1.2.x' 2015-07-13 15:43:40 +01:00
izeye d06f3b1a25 Fix typo
Closes gh-3473
2015-07-13 14:59:15 +02:00
Dave Syer d0cf6b534b Add 3xx redirects to the "unmapped" class of requests for metrics
When Spring Security sends 302 responses to a login page we don't get
any information about the request matching in Spring MVC. Consequently
apps can end up with a lot of counter.status.302.* metrics (where
"*" can be whatever the user sent).

This change treats 3xx the same as 4xx (if it is unmapped it just gets
added to a metric called "unmapped" instead of using the actual request
path).

Fixes gh-2563
2015-07-13 13:33:30 +01:00
Dave Syer 82da28f627 Add support for custom Exporter with declarative schedule 2015-07-13 10:11:33 +01:00
Andy Wilkinson 58509ed7c5 Merge branch '1.2.x' 2015-07-13 09:59:27 +01:00
Johannes Stelzer fdb83ec338 Correct assertion for indicators parameter in CompositeHealthIndicator
Closes gh-3417
2015-07-13 09:58:33 +01:00
Phillip Webb 67f7079cb2 Formatting 2015-07-09 10:18:05 -07:00
Stephane Nicoll 97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Phillip Webb 5938c967a3 Polish 2015-07-08 14:10:05 -07:00
Dave Syer 7ceb7ce6f6 Add send count to Integration metrics
Fixed gh-3364
2015-07-08 16:13:17 +01:00
Dave Syer 94e41b4190 Fix assertion in broken test 2015-07-08 16:03:25 +01:00
Dave Syer 7410eee34f Add custom condition for /logfile endpoint
Fixes gh-3360
2015-07-08 15:59:05 +01:00
Dave Syer c71196b92d Better segregation of export and redis keys 2015-07-08 15:52:50 +01:00
Stephane Nicoll 54619bec3f Clarify javadoc
This might just be me but when I read the original javadoc it made me
think that caching worked only if the endpoint is accessed anonymously.
2015-07-08 15:05:50 +02:00
Phillip Webb 7dcb79b3b3 Support more lenient DB2 product lookups
Update DataSourceHealthIndicator to support pattern based matching for
DB2 products. Prior to this commit product identifiers of the form
`DB2/LINUXX8664` were not supported.

Fixes gh-3377
2015-07-07 23:18:21 -07:00
Phillip Webb 85535f0882 Disable DB migrations in ApplicationHierarchyTests 2015-07-07 22:17:10 -07:00
Eddú Meléndez 3995c16ba6 Add 'flyway' and 'liquibase' actuator endpoints
Add `/flyway` and `/liquibase` actuator endpoints to provide details of
any database migrations that have been applied.

Fixes gh-3434
Closes gh-3435
2015-07-07 18:58:18 -07:00
Phillip Webb 7e58483ead Add serialization endpoint tests
Test basic serialization in Endpoint tests to ensure that JSON
can always be produced.
2015-07-07 18:31:43 -07:00
Phillip Webb 9b78f5d52e Replace @ConditionalOnExpression conditions
Replace @ConditionalOnExpression usage in auto-configuration in favor
of faster direct Environment access.
2015-07-07 16:27:30 -07:00
Phillip Webb 71dbec381a Create @ManagementContextConfiguration annotation
Replace the previously used `EndpointWebMvcConfiguration`
`spring.factories` key with a dedicated ManagementContextConfiguration
annotation.

Also renamed the EndpointWebMvcHypermediaConfiguration and
EndpointWebMvcConfiguration classes to make it clearer that they are
for the management context.

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb b2fcd77d93 Rework EndpointWebMvcAutoConfiguration port logic
Update the `ManagementServerPort` detection logic to attempt direct
property resolution before looking for a local property bean
definition. Bean definitions provided by auto-configuration classes
are ignored.

This change allow `OnManagementMvcCondition` to use the
`ManagementServerPort` to determine when `EndpointWebMvcConfiguration`
should apply (removing the need to create a temporary context).

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb 4c8c376829 Refactor EndpointPathRequestMatcher
Refactor `EndpointPathRequestMatcher` so that the side effect of setting
`endpointHandlerMapping` in the parent class is a little more obvious.
2015-07-07 15:03:21 -07:00
Stephane Nicoll 774474f8b7 Add hint providers for core properties
Closes gh-3322
2015-07-06 11:57:32 +02:00
Phillip Webb e8085016ba Polish Actuator hypermedia support 2015-07-05 22:28:04 -07:00
izeye 99cd9bdc31 Fix typo
Closes gh-3416
2015-07-05 16:40:41 +02:00
izeye b4f636b33f Fix typo
Closes gh-3411
2015-07-03 02:19:47 -07:00
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
2015-07-02 13:26:02 +01:00
Phillip Webb b1f8a692a8 Merge branch '1.2.x' 2015-07-01 19:30:12 -07:00
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
2015-07-01 18:11:53 -07:00
Phillip Webb d61c38167e Formatting 2015-07-01 16:18:26 -07:00
Dave Syer 5541b3be43 Remove @OnManagementMvcCondition and use a private class
Fixes gh-3373
2015-07-01 09:06:54 +01:00
Phillip Webb b5c435f8c4 Polish Actuator MVC customization support
See gh-3345
2015-06-30 22:09:38 -07:00
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
2015-06-30 09:42:58 +01:00
Phillip Webb b68382f3ba Polish 2015-06-26 16:06:11 -07:00
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
2015-06-26 13:44:52 +01:00
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).
2015-06-26 12:37:09 +01:00
Stephane Nicoll 12767a43e2 Remove unnecessary import
See gh-3335
2015-06-26 08:26:16 +02:00
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
2015-06-26 08:25:18 +02:00
Stephane Nicoll 56b13800ae Fix json structure 2015-06-25 10:25:21 +02:00
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
2015-06-24 20:05:37 -07:00
Stephane Nicoll 41b4d41f11 Remove dead code 2015-06-24 15:57:43 +02:00
Stephane Nicoll e9baa779cc Remove dead code 2015-06-24 15:52:27 +02:00
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
2015-06-23 17:14:40 -07:00
Phillip Webb 61fc4f3f12 Polish copyright headers 2015-06-23 10:22:14 -07:00
Stephane Nicoll d0698bd8ed Remove unnecessary System.out in tests 2015-06-23 15:57:40 +02:00
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
2015-06-22 23:43:58 -07:00
Andy Wilkinson d3d713d0c9 Merge branch '1.2.x' 2015-06-22 15:30:15 +01:00
olivier bourgain 5ed2a9632b Make InMemoryTraceRepository thread-safe
Closes gh-3027
2015-06-22 15:30:00 +01:00
Phillip Webb 2f16a01dd5 Polish 2015-06-18 14:11:40 -07:00
dgomesbr 1ebbf8ac4d Upgrade to Hazelcast 3.5
Closes gh-3267
Closes gh-3272
2015-06-18 14:12:28 +02:00
Stephane Nicoll 7ed1aa279a Add Informix specific health query
Closes gh-1287
2015-06-18 10:13:32 +02:00
Johannes Stelzer ea2a09cbf6 Add DB2 specific health query
Closes gh-2565
2015-06-18 10:11:02 +02:00
Stephane Nicoll fd5d6ef303 Polish 2015-06-18 08:52:47 +02:00
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
2015-06-18 08:11:39 +02:00
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
2015-06-17 11:47:05 +02:00
Phillip Webb 8b9c38085a Merge pull request #3117 from izeye/metrics
* metrics2:
  Remove duplicate code in new metrics code
2015-06-16 22:03:43 -07:00
izeye b47634176f Remove duplicate code in new metrics code
Refactor BufferMetricReader, CounterBuffers and GaugeBuffers to reduce
duplicate code.

Closes gh-3117
2015-06-16 22:03:22 -07:00
izeye de91dc0de7 Change Codahale to Dropwizard in Javadoc. 2015-06-16 21:39:00 -07:00
Phillip Webb af5338f26e Formatting 2015-06-16 17:26:26 -07:00
Stephane Nicoll 8c7b8afedb Polish 2015-06-16 10:31:24 +02:00
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
2015-06-16 10:11:46 +02:00
Stephane Nicoll 641ceca3a9 Lower logging level of audit events
Closes gh-3107
2015-06-12 17:56:21 +02:00
Andy Wilkinson f73d86e700 Upgrade to Elasticsearch 1.5.2
Closes gh-3194
2015-06-10 14:26:09 +01:00
Stephane Nicoll be26cba01e Merge branch '1.2.x' 2015-06-08 15:43:48 +02:00
Stephane Nicoll 5a57913732 Tune spring-boot-actuator logging config
Closes gh-3060
2015-06-08 15:43:30 +02:00
Phillip Webb 7609c43685 Switch Javadoc <code>...</code> to {@code ...}
Update Javadoc to use the {@code ...} syntax when possible.
2015-06-05 10:10:34 -07:00
Phillip Webb 6230d905c6 Polish 2015-06-05 09:32:07 -07:00
Stephane Nicoll 9b5e5f7bf8 Fix Javadoc 2015-06-05 17:22:17 +02:00
Eddú Meléndez baca62a6c0 Fix typos 2015-06-05 16:59:51 +02:00
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.".
2015-06-05 11:54:06 +01:00
Phillip Webb 683c19ee8b Polish 2015-06-04 12:21:35 -07:00
Stephane Nicoll f6115a0713 polish
Closes gh-3110
2015-06-04 14:49:49 +02:00
izeye 5096a5d242 Remove duplicate in MetricExportProperties
Closes gh-3109
2015-06-04 14:36:42 +02:00
Dave Syer 6c653038f6 Remove getDefault() from MetricExportProperties
Fixes gh-3112
2015-06-04 12:39:54 +01:00
Dave Syer c108b1483a Restore and deprecate DropwizardMetricWriter
Fixes gh-3113
2015-06-04 12:36:31 +01:00
Phillip Webb 31d6a0f17a Polish updated metrics code 2015-06-04 00:56:00 -07:00
Phillip Webb d2f11c465e Polish cache code 2015-06-04 00:55:38 -07:00
Phillip Webb 412b7b9e50 Polish 2015-06-04 00:55:30 -07:00
Phillip Webb 4a097f8550 Merge branch '1.2.x' 2015-06-02 14:32:56 -07:00
Phillip Webb df0ba5c03a Guard against metric failures in MetricsFilter
Update MetricsFilter so that failures to record metrics are logged and
ignored.

Fixes gh-2777
2015-06-02 14:30:59 -07:00
Phillip Webb 49c4710f63 Merge branch '1.2.x' 2015-06-02 12:32:46 -07:00
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
2015-06-02 12:01:47 -07:00
Phillip Webb aaa2ff54dd Extract @ConditionalOnEnabledEndpoint
Extract @ConditionalOnEnabledEndpoint to a top level class.

See gh-2798
2015-06-02 11:17:23 -07:00
Phillip Webb 968b68c322 Polish 2015-06-02 11:17:16 -07:00
Stephane Nicoll 18d7634947 Add basic cache metrics support for Infinispan
Closes gh-3066
2015-06-01 17:41:59 +02:00
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
2015-06-01 15:08:59 +02:00
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.
2015-06-01 11:31:41 +01:00
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.
2015-05-31 12:51:07 +01:00
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.*).
2015-05-31 12:18:43 +01:00
Dave Syer a49901f0dc Tweak conditions on metric export to make it easier to override 2015-05-29 14:25:12 +01:00
izeye 8f0fd21f11 Fix redudant assertion in test
Closes gh-3064
2015-05-29 09:51:44 +02:00
izeye 88612393f3 Fix allowCredentials property handling
Closes gh-3059
2015-05-28 15:44:49 +02:00
Andreas Ahlenstorf 9805643e41 Fix spring-security versions
Closes gh-3050
2015-05-27 16:57:56 +02:00
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
2015-05-27 14:24:47 +02:00
Stephane Nicoll fc61f2e837 Improve documentation for JMX related keys
Closes gh-2747
2015-05-27 11:36:34 +02:00
Stephane Nicoll ab55331863 Improve configuration keys documentation 2015-05-26 17:26:01 +02:00
Dave Syer 5468949a55 Update to latest 1.3 code 2015-05-26 06:34:43 +01:00
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.
2015-05-20 10:49:16 +01:00
Andy Wilkinson 2a1bca6806 Update field that’s checked reflectively to match Spring MVC’s internals 2015-05-19 16:41:24 +01:00
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
2015-05-19 09:13:27 +01:00