Throw an exception if actuator is running on the main server port and
the base path and an individual mapping are set to '/'.
See gh-45251
Signed-off-by: yongjunhong <dev.yongjunh@gmail.com>
Previously, OAuth2 client auto-configuration was managed by a single
class:
- OAuth2ClientAutoConfiguration for servlet apps
- ReactiveOAuth2ClientAutoConfiguration for reactive apps
OAuth2ClientAutoConfiguration being for servlet apps meant that
a blocking OAuth2 client was not availabile in a non-web application.
The auto-configuration classes did two things:
- Auto-configured beans that are specific to server-side web security
that uses an OAuth2 client
- Auto-configured OAuth2 client beans that may be used client- or
server-side
Combining these two things into a single auto-configuration class
meant that you could not choose to use one or the other. For example,
you may want to make use of an OAuth2 client in a web application
without also using OAuth2 client-based web security.
This commit restructures the auto-configuration to address these
problems. There are now two auto-configurations for non-reactive apps:
- OAuth2ClientAutoConfiguration
- OAuth2ClientWebSecurityAutoConfiguration
and two auto-configurations for reactive apps:
- ReactiveOAuth2ClientAutoConfiguration
- ReactiveOAuth2ClientWebSecurityAutoConfiguration
This separation allows one to be used without the other. Furthermore,
the conditions have been updated so that, for example, the blocking
OAuth2 client is available in a non-web application.
Closes gh-40997
Closes gh-44906
Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
Add configuration properties support for the new `OtlpConfig` methods
`histogramFlavorPerMeter` and `maxBucketsPerMeter`. The existing
`histogramFlavor` and `maxBucketCount` configuration properties are
used as defaults when there isn't a specific per-meter configuration
set.
See gh-45203
Update `OtlpMetricsExportAutoConfiguration` to use the new
`OtlpMetricsSender`interface that allows users to customize the
sending of OTLP metrics using the `OtlpMeterRegistry`.
See gh-45204
Update `OtlpMetricsExportAutoConfiguration` to use the new
`OtlpMetricsSender`interface that allows users to customize the
sending of OTLP metrics using the `OtlpMeterRegistry`.
See gh-45204
Add tests for decoding percent-encoded strings with non-ASCII characters
and multi-byte sequences.
See gh-44944
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
This commit adds customizers for both OtlpHttpSpanExporterBuilder
and OtlpGrpcSpanExporterBuilder.
See gh-44900
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Previously, if a prototype DataSource bean was defined, Actuator's
metrics and health would try to access an instance of it. At best
this was wasteful as the new instance would only be used for metrics
and health and would not be indicative of the app's DataSource usage.
At worst, it could cause a failure in the unusual case of the
prototype bean definition requiring arguments to be supplied using
ObjectProvider.getObject(Object...) or the like.
This commit address the problem by ignoring prototype DataSource
for metrics and health.
Other types of beans for which Actuator provides metrics and health
are similarly affected. They have not be fixed here as the situation
is so unusual. Should another problem arise in the future, it can be
addressed at that time when there's a clear need.
Closes gh-44706
Update OpenTelemetryResourceAttributes to use StringUtils.uriDecode(...)
as it provides the same functionality as the custom decode(...) method.
See gh-44677
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
This commit adds the following properties to allow customization
of the BatchSpanProcessor:
- management.tracing.opentelemetry.export.include-unsampled
- management.tracing.opentelemetry.export.timeout
- management.tracing.opentelemetry.export.max-batch-size
- management.tracing.opentelemetry.export.max-queue-size
- management.tracing.opentelemetry.export.schedule-delay
Default values were taken from BatchSpanProcessorBuilder.
See gh-44655
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
META-INF/spring.factories and META-INF/spring/aot.factories in the
main source set are now checked. The checks verify that:
- Each class listed in the values exists in the source set's output
- The classes are listed alphabetically
- Nested classes are identified using their binary name
Closes gh-44676
This commit allows EntityManagerFactoryBuilder to provide the JPA
properties to use according to the DataSource used to build the
EntityManagerFactory. Previously the JPA properties were computed only
once based on the primary data source, which was a problem since its
default DDL setting may be different.
EntityManagerFactoryBuilder takes a function that provides the JPA
properties based on a data source, rather than the properties
themselves. Constructors with the previous variant have been deprecated
as a result.
Closes gh-44516