Commit Graph

1539 Commits

Author SHA1 Message Date
Andy Wilkinson
99edda735e Polish 2022-10-25 12:57:58 +01:00
Andy Wilkinson
b7fb345709 Revert workaround for multiple ImportRuntimeHints
Closes gh-32830
2022-10-24 10:20:50 +01:00
Johnny Lim
fc61690675 Add missing @Test to sanitizeLists()
See gh-32792
2022-10-21 12:05:44 +01:00
Sébastien Deleuze
4e131bd627 Provide a workaround to allow multiple @ImportRuntimeHints
Provide a workaround for spring-projects/spring-framework#29361 so
that multiple `@ImportRuntimeHints` can be used in a type hierarchy.

The commit should cover Actuator web endpoint use cases with the
exception of Cloud Foundry endpoints which are not possible due to
package access issues.

See gh-29361
2022-10-20 17:12:58 -07:00
Brian Clozel
685fa900f8 Auto-configure Observation instrumentation for WebFlux
Prior to this commit, Spring Boot would offer a specific Metrics
instrumentation for WebFlux applications through a `WebFilter` and
custom Tag providers.

As of Spring Framework 6.0, the Observation instrumentation is done
directly in WebFlux, also with a `WebFilter`. While this allows both
metrics and traces, some features cannot be supported in the same way
with this new infrastructure.
The former `WebFilter` has been removed and the Tagging infrastructure
deprecated in favor of custom Observation conventions. This commit
provides an adapter layer so that developers can refactor their custom
tagging solution to the convention way, during the deprecation phase,
without losing any feature.

Closes gh-32539
2022-10-20 15:29:31 +02:00
Brian Clozel
9948fc3e39 Use GraphQL Observation instrumentation
This commit migrates the existing metrics support (added in #29140) to
the new `Observation` instrumentation contributed in
spring-projects/spring-graphql#501.

We cannot have a smoother migration path here as the instrumentation
does not use the same context information for metadata extraction.

Closes gh-32794
2022-10-19 22:06:40 +02:00
Madhura Bhave
ce3c933f77 Adapt to Spring Security changes
Closes gh-32604
2022-10-19 11:46:27 -07:00
Brian Clozel
b2fe807d47 Move MVC metrics to Observation auto-configuration
This commit moves the entire Metrics auto-configuration for Spring MVC
to the new `Observation` API and the instrumentation contributed in
Spring Framework.

Closes gh-32538
2022-10-19 19:33:31 +02:00
Phillip Webb
07dd388b58 Merge branch '2.7.x'
Closes gh-32776
2022-10-18 15:51:27 -07:00
Phillip Webb
8dec296dfd Merge branch '2.6.x' into 2.7.x
Closes gh-32775
2022-10-18 15:49:51 -07:00
Phillip Webb
de111dba5c Polish 'Add DataSize serializer for configprops endpoint'
See gh-32645
2022-10-18 15:46:56 -07:00
Guirong Hu
3b25132e38 Add DataSize serializer for configprops endpoint
See gh-32645
2022-10-18 15:46:33 -07:00
Phillip Webb
e3df6c5b6f Move @ConstructorBinding annotation and support add default support
Relocate `@ConstructorBinding` from the `boot.context.properties`
package to `boot.context.properties.bind` and update the
`DefaultBindConstructorProvider` to support it.

Closes gh-32660
2022-10-18 00:59:45 -07:00
Brian Clozel
5cee828546 Fix javadoc warnings in HTTP Observation support 2022-10-17 23:06:30 +02:00
Brian Clozel
cbca457eff Adapt to HTTP Observation changes in Framework
This commit adapts to the renames/package changes in the HTTP
Observation support in Spring Framework.

See spring-projects/spring-framework#29334
2022-10-17 22:46:06 +02:00
Andy Wilkinson
7852c45a77 Generate reflection hints for loggers endpoint's responses
Some of the types that are returned are hidden behind a
Map<String, Object> so the operation annotations already been marked
as reflective isn't sufficient.

This commit uses `@RegisterReflectionForBinding` to register the
types that are used as (nested) values in the response maps.

Closes gh-32486
2022-10-12 15:56:22 +01:00
Stephane Nicoll
cbf24bd1cd Upgrade to Elasticsearch Client 8.4.3
Closes gh-32671
2022-10-11 12:42:17 +02:00
Johnny Lim
73fd760137 Polish HTTP client observability changes
See gh-32484
See gh-32518

Closes gh-32636
2022-10-07 19:05:14 +02:00
Brian Clozel
d25fc73dae Upgrade to Neo4J Java Driver 5.0.0
Closes gh-32620
2022-10-06 19:46:31 +02:00
Andy Wilkinson
7c4e46e538 Allow thread dump endpoint to call ThreadMXBean in a native image
Closes gh-31680
2022-10-04 17:09:22 +01:00
Phillip Webb
e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
Andy Wilkinson
51df7813a5 Remove code deprecated in 2.x and add since and forRemoval attributes
Closes gh-32548
Closes gh-32549
2022-09-30 14:39:05 +01:00
Brian Clozel
5b092f5d80 Polish
See gh-32518
2022-09-30 12:52:22 +02:00
Brian Clozel
ceb1e5d223 Polish
See gh-32518
2022-09-30 12:16:55 +02:00
Brian Clozel
8b4a20d6cd Use Observation infrastructure for instrumenting WebClient
As of spring-projects/spring-framework#28341, `WebClient` is
instrumented directly for `Observation`.
This commit removes the custom `ExchangeFilterFunction` that previously
instrumented the client for metrics.

As a result, the relevant tag providers are now deprecated and adapted
as `ObservationConvention` for the time being.

Closes gh-32518
2022-09-30 11:24:35 +02:00
Brian Clozel
eac50a8f0c Auto-configure Observation support for RestTemplate
Prior to this commit, Spring Boot would auto-configure a customizer that
instruments `RestTemplate` through a `RestTemplateBuilder`. This would
install a request interceptor that instrumented client exchanges for
producing metrics.

As of spring-projects/spring-framework#28341, the instrumentation is
done at the `RestTemplate` level directly using the `Observation` API.
The `Tag` (now `KeyValue`) extraction, observation name and
instrumentation behavior now lives in the Spring Framework project.

This commit updates the auto-configuration to switch from Boot-specific
Metrics instrumentation to a generic Observation instrumentation.
As a migration path, some configuration properties are deprecated in
favor of the new `management.observations.*` namespace.

Closes gh-32484
2022-09-27 22:19:01 +02:00
Stephane Nicoll
bac1bfcd1c Merge branch '2.7.x'
Closes gh-32514
2022-09-27 08:41:35 +02:00
Stephane Nicoll
eb4b0a3f3c Merge branch '2.6.x' into 2.7.x
Closes gh-32513
2022-09-27 08:41:20 +02:00
Stephane Nicoll
8f598f876b Polish "Use non-blocking API in CouchbaseReactiveHealthIndicator"
See gh-32505
2022-09-27 08:34:22 +02:00
Mico Piira
f51c4c3df0 Use non-blocking API in CouchbaseReactiveHealthIndicator
See gh-32505
2022-09-27 08:31:57 +02:00
Andy Wilkinson
5cb68eab1e Remove HotSpot specifics from HeapDumper strategy interface
Closes gh-27533
2022-09-16 12:53:43 +01:00
Madhura Bhave
b44a7e242c Support Mongo's Stable API in MongoHealthIndicator
Closes gh-30849
2022-09-15 16:48:22 -07:00
Stephane Nicoll
26cec61f32 Adapt to API change in Spring Framework
See https://github.com/spring-projects/spring-framework/issues/29135
2022-09-12 15:39:03 +02:00
Andy Wilkinson
aafceb3868 Merge branch '2.7.x'
Closes gh-32285
2022-09-09 16:47:06 +01:00
Andy Wilkinson
f17df7bf30 Merge branch '2.6.x' into 2.7.x
Closes gh-32284
2022-09-09 16:46:43 +01:00
Andy Wilkinson
23c2f73b3f Update tests to allow them to run on Java 19
Closes gh-32280
2022-09-09 16:46:14 +01:00
Phillip Webb
46be4a3f30 Merge branch '2.7.x' 2022-09-08 19:38:18 -07:00
Johnny Lim
2273191c03 Polish
See gh-32215
2022-09-07 08:48:08 +02:00
Andy Wilkinson
25e6c533d9 Polish "Add path to DiskSpaceHealthIndicator's details and log message"
See gh-31998
2022-09-05 13:16:12 +01:00
rreich
36f9230f01 Add path to DiskSpaceHealthIndicator's details and log message
See gh-31998
2022-09-05 13:15:56 +01:00
Andy Wilkinson
795ea289db Adapt to BindingReflectionHintsRegistrar moving package 2022-09-02 19:46:02 +01:00
Andy Wilkinson
cf8e84d406 Adapt to BindingReflectionHintsRegistrar moving into spring-core 2022-09-02 17:34:29 +01:00
Phillip Webb
44f1949c5e Polish hint API calls 2022-09-01 19:43:43 -07:00
Madhura Bhave
47effdcade Support role-based sanitization for actuator endpoints
Closes gh-32156
2022-08-24 16:03:58 -07:00
Stephane Nicoll
24a52aa66d Annotate actuator internal infrastructure with @Reflective
This commit simplifies the registration of hints for the infrastructure
of the Actuator that is invoked via reflection.
2022-08-17 17:25:06 +02:00
Stephane Nicoll
6d2d67b0bc Merge branch '2.7.x'
Closes gh-32050
2022-08-10 09:16:15 +02:00
Vedran Pavic
0e6cf07ec9 Polish LogFileWebEndpoint
See gh-32049
2022-08-10 09:12:57 +02:00
Andy Wilkinson
ba93e6c0ed Restore support for Jersey
Closes gh-28637
2022-08-08 15:45:20 +01:00
Madhura Bhave
0991bd3983 Harmonize data configuration
Any classes that rely on Spring Data being on the classpath
have been moved under a data package.

Certain configuration properties have also been updated to
accurately reflect whether Spring Data is required for the
auto-configuration to work.

Closes gh-11574
2022-08-05 13:32:25 -07:00
Johnny Lim
6a4681baf5 Polish
See gh-31948
2022-08-02 15:14:23 +02:00