mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 20:19:06 +00:00
Move ConditionalOnEnabledLoggingExport to opentelemetry module
This commit moves the `ConditionalOnEnabledLoggingExport` condition from the "spring-boot-actuator-autoconfigure" to the "spring-boot-opentelemetry" one, because without that the logging export feature requires the actuator module to be on the classpath. Fixes gh-48488
This commit is contained in:
@@ -33,7 +33,6 @@ dependencies {
|
||||
optional(project(":core:spring-boot-autoconfigure"))
|
||||
optional(project(":core:spring-boot-docker-compose"))
|
||||
optional(project(":core:spring-boot-testcontainers"))
|
||||
optional(project(":module:spring-boot-actuator-autoconfigure"))
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("org.testcontainers:testcontainers-grafana")
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.logging;
|
||||
package org.springframework.boot.opentelemetry.autoconfigure.logging;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.logging;
|
||||
package org.springframework.boot.opentelemetry.autoconfigure.logging;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+1
-2
@@ -19,7 +19,6 @@ package org.springframework.boot.opentelemetry.autoconfigure.logging.otlp;
|
||||
import io.opentelemetry.api.OpenTelemetry;
|
||||
import io.opentelemetry.sdk.logs.SdkLoggerProvider;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.logging.ConditionalOnEnabledLoggingExport;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
@@ -35,7 +34,7 @@ import org.springframework.context.annotation.Import;
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({ ConditionalOnEnabledLoggingExport.class, OpenTelemetry.class, SdkLoggerProvider.class })
|
||||
@ConditionalOnClass({ OpenTelemetry.class, SdkLoggerProvider.class })
|
||||
@EnableConfigurationProperties(OtlpLoggingProperties.class)
|
||||
@Import({ ConnectionDetails.class, Exporters.class })
|
||||
public final class OtlpLoggingAutoConfiguration {
|
||||
|
||||
+1
-1
@@ -25,11 +25,11 @@ import io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporter;
|
||||
import io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporterBuilder;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.logging.ConditionalOnEnabledLoggingExport;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.opentelemetry.autoconfigure.logging.ConditionalOnEnabledLoggingExport;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ package org.springframework.boot.opentelemetry.autoconfigure.logging.otlp;
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
|
||||
/**
|
||||
* Details required for actuator to establish a connection to an OpenTelemetry logging
|
||||
* service.
|
||||
* Details required to establish a connection to an OpenTelemetry logging service.
|
||||
*
|
||||
* @author Toshiaki Maki
|
||||
* @since 4.0.0
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.logging;
|
||||
package org.springframework.boot.opentelemetry.autoconfigure.logging;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
Reference in New Issue
Block a user