2005 Commits

Author SHA1 Message Date
Andy Wilkinson
be48f37a83 Fix LogbackMetrics auto-config test with Logback and Log4j2 on cp
Closes gh-32533
2022-09-29 10:03:52 +01:00
dreis2211
388134713e Remove unused MockReactiveWebServerFactory
See gh-32526
2022-09-29 09:33:29 +02:00
Andy Wilkinson
0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2022-09-28 21:14:08 +01:00
Andy Wilkinson
574242b44f Polish "Break cycles between Zipkin senders and HTTP client observation"
See gh-32528
2022-09-28 20:28:11 +01:00
Marcin Grzejszczak
b41ed44b60 Break cycles between Zipkin senders and HTTP client observation
Previously, RestTemplateBuilder and WebClient.Builder beans were used
to create the HTTP client for sending out spans. Those same beans are
also instrumented for observability which results in a cycle.

This commit breaks the cycle by not using the application-web
builders to create the RestTemplate and WebClient's used by the Zipkin
senders. Instead, builders are created inline, with new callbacks
being introduced to allow the user to customize these Zipkin-specific
builders.

See gh-32528
2022-09-28 20:11:44 +01:00
Andy Wilkinson
8c74b62888 Polish "Prefer WebClient to RestTemplate for Zipkin's Sender"
See gh-32529
2022-09-28 19:07:27 +01:00
Marcin Grzejszczak
cd3b3d468a Prefer WebClient to RestTemplate for Zipkin's Sender
Previously, a Webclient-based sender was only for reactive web
applications, falling back to a RestTemplate-based sender in all
other cases.

With this commit we now prefer to use WebClient if it is available,
irrespective of the web application type. The assumption is that
if the user has WebClient on the classpath, it's either a reactive
web application, or it's a servlet web application or non-web
application but WebClient is preferred.

See gh-32529
2022-09-28 19:04:30 +01: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
Andy Wilkinson
36a4b36ccb Polish "Add support for MDC, Context Propagation (via B3 and W3C), and Baggage"
See gh-32480
2022-09-27 16:47:09 +01:00
Marcin Grzejszczak
52d1436dc6 Add support for MDC, Context Propagation (via B3 and W3C), and Baggage
See gh-32480
2022-09-27 16:47:03 +01:00
Andy Wilkinson
5449397463 Require micrometer-tracing-bridge-otel to auto-configure OTel
Closes gh-32503
2022-09-27 09:10:44 +01:00
Andy Wilkinson
6cc3619675 Require micrometer-tracing-bridge-brave to auto-configure Brave
Closes gh-32502
2022-09-27 08:35:22 +01:00
Vedran Pavic
230f2cda84 Migrate to AuthorizationFilter in Spring Security auto-config
This commit updates Servlet based Spring Security auto-configuration
to use AuthorizationFilter, which is intended to supersede
FilterSecurityInterceptor.

See gh-31255
2022-09-22 13:53:54 +01:00
Scott Frederick
08022ba86e Remove support for locating imports using spring.factories
With this commit, loading `@AutoConfiguration`,
`@ImportAutoConfiguration`, and `@ManagementContextConfiguration`
classes is supported with `.imports` files only. Support for loading
these classes with `spring.factories` is removed.

Closes gh-29699
2022-09-21 17:34:51 -05:00
Scott Frederick
f9c341c75a Revert "Generate the AutoConfiguration.imports file from annotations"
This reverts commit da4de7d67d442771704fba268f33fbc90aaaf1aa.
2022-09-21 14:50:15 -05:00
Scott Frederick
d62d7ca75d Revert "Generate ManagementContextConfiguration.imports file from annotations"
This reverts commit 6b3b0dd3a6ac4818388e97e121de69a91e21657d.
2022-09-21 14:50:15 -05:00
Andy Wilkinson
b084019d34 Reverse the order of tracing and metrics handlers
Closes gh-32463

Co-authored-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
2022-09-21 19:05:21 +01:00
Andy Wilkinson
78a64d7f61 Allow DefaultMeterObservationHandler to be replaced by user's bean
Closes gh-32462

Co-authored-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
2022-09-21 19:05:07 +01:00
Andy Wilkinson
5cb68eab1e Remove HotSpot specifics from HeapDumper strategy interface
Closes gh-27533
2022-09-16 12:53:43 +01:00
Stephane Nicoll
84298e3326 Adapt to API change in Spring Framework
See https://github.com/spring-projects/spring-framework/issues/29005
2022-09-12 10:13:03 +02:00
Andy Wilkinson
144fdaa703 Merge branch '2.6.x' into 2.7.x
Closes gh-32283
2022-09-09 15:14:40 +01:00
Andy Wilkinson
78f4242e46 Build with Gradle 7.5 while still supporting Gradle 6.8+
Closes gh-32281
2022-09-09 15:13:43 +01:00
Brian Clozel
89c61e9093 Adapt GlobalObservationConvention imports
See micrometer-metrics/micrometer#3387
2022-09-09 14:30:53 +02:00
Phillip Webb
46be4a3f30 Merge branch '2.7.x' 2022-09-08 19:38:18 -07:00
Phillip Webb
e88a682220 Merge branch '2.6.x' into 2.7.x 2022-09-08 19:37:52 -07:00
Phillip Webb
85697ac482 Update copyright year of changed files 2022-09-08 19:36:59 -07:00
Jonatan Ivanov
13a2ea9194 Build against Micrometer 1.10.0-M5 and Tracing 1.0.0-M8 snapshots
See gh-32048

Co-authored-by: Marcin Grzejszczak <mgrzejszczak@vmware.com>
2022-09-06 20:15:51 +01:00
Stephane Nicoll
e5d0e34268 Adapt to recent changes in Spring Framework
See https://github.com/spring-projects/spring-framework/issues/29082
See https://github.com/spring-projects/spring-framework/issues/28877
2022-09-05 18:23:05 +02:00
Scott Frederick
6b3b0dd3a6 Generate ManagementContextConfiguration.imports file from annotations
This commit adds the
`ManagementContextConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module.

Closes gh-32222
2022-09-02 16:27:59 -05:00
Scott Frederick
da4de7d67d Generate the AutoConfiguration.imports file from annotations
This commit adds the `AutoConfigurationImportsAnnotationProcessor` to
the `spring-boot-autoconfigure-processor` annotation processor
module. When added to a project build, the annotation processor will
generate the
`org.springframework.boot.autoconfigure.AutoConfiguration.imports`
file automatically from `@AutoConfiguration`-annotated classes. It
also applies the annotation processor to the Spring Boot build.

Closes gh-31228
2022-09-02 15:10:22 -05: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
Andy Wilkinson
d6e9a03136 Adapt to synthesized annotation changes in Framework 2022-09-02 17:01:51 +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
e6977777cc Merge branch '2.7.x'
Closes gh-32100
2022-08-17 09:10:13 +02:00
Stephane Nicoll
ca63a6e9ad Merge branch '2.6.x' into 2.7.x
Closes gh-32099
2022-08-17 09:10:02 +02:00
Stephane Nicoll
191593cf15 Review Git contribution documentation
Closes gh-31904
2022-08-17 08:58:56 +02:00
Madhura Bhave
cea6492c4a Align default JMX and WEB endpoint exposures
Closes gh-32005
2022-08-16 14:29:08 -07:00
Stephane Nicoll
888ccfea2d Adapt to changes in Spring Framework 2022-08-16 16:02:00 +02:00
Andy Wilkinson
ba93e6c0ed Restore support for Jersey
Closes gh-28637
2022-08-08 15:45:20 +01:00
Andy Wilkinson
fb2f7c1e38 Fix test to create correct type of child context
Closes gh-32002
2022-08-08 14:18:40 +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
Stephane Nicoll
1af5994d8f Adapt to API change in Spring Framework
See https://github.com/spring-projects/spring-framework/issues/28927
2022-08-05 10:39:36 +02:00
Andy Wilkinson
2f0dfc341c Merge branch '2.7.x'
Closes gh-31972
2022-08-03 15:20:34 +01:00
Andy Wilkinson
700460c322 Merge branch '2.6.x' into 2.7.x
Closes gh-31971
2022-08-03 14:58:07 +01:00
Andy Wilkinson
fa73b73898 Fail build on missing configuration property descriptions
Closes gh-31916
2022-08-03 14:45:42 +01:00
Johnny Lim
6a4681baf5 Polish
See gh-31948
2022-08-02 15:14:23 +02:00
Moritz Halbritter
eaf8683e8d Fix timeunit in ZipkinConfigurations to milliseconds instead of seconds
Closes gh-31957
2022-08-02 13:40:00 +02:00