diff --git a/settings.gradle b/settings.gradle index 2094448da0..bff3fe178f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -69,7 +69,6 @@ include "spring-boot-project:spring-boot-data-rest" include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-docker-compose" -include "spring-boot-project:spring-boot-docker-compose-all" include "spring-boot-project:spring-boot-docs" include "spring-boot-project:spring-boot-elasticsearch" include "spring-boot-project:spring-boot-flyway" diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 86b6a170ba..28ac0f932f 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2005,7 +2005,6 @@ bom { "spring-boot-data-rest", "spring-boot-devtools", "spring-boot-docker-compose", - "spring-boot-docker-compose-all", "spring-boot-elasticsearch", "spring-boot-flyway", "spring-boot-freemarker", diff --git a/spring-boot-project/spring-boot-docker-compose-all/build.gradle b/spring-boot-project/spring-boot-docker-compose-all/build.gradle deleted file mode 100644 index eb7d5a865b..0000000000 --- a/spring-boot-project/spring-boot-docker-compose-all/build.gradle +++ /dev/null @@ -1,72 +0,0 @@ -plugins { - id "java-library" - id "org.springframework.boot.deployed" - id "org.springframework.boot.docker-test" - id "org.springframework.boot.optional-dependencies" -} - -description = "Spring Boot Docker Compose All" - -dependencies { - api(project(":spring-boot-project:spring-boot")) - api(project(":spring-boot-project:spring-boot-docker-compose")) - - dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) - dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-liquibase")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-opentelemetry")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-pulsar")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-r2dbc")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) - dockerTestImplementation("com.redis:testcontainers-redis") - dockerTestImplementation("org.assertj:assertj-core") - dockerTestImplementation("org.awaitility:awaitility") - dockerTestImplementation("org.junit.jupiter:junit-jupiter") - dockerTestImplementation("org.testcontainers:testcontainers") - - dockerTestRuntimeOnly("com.clickhouse:clickhouse-jdbc") - dockerTestRuntimeOnly("com.clickhouse:clickhouse-r2dbc") - dockerTestRuntimeOnly("com.microsoft.sqlserver:mssql-jdbc") - dockerTestRuntimeOnly("com.oracle.database.r2dbc:oracle-r2dbc") - dockerTestRuntimeOnly("io.opentelemetry:opentelemetry-exporter-otlp") - dockerTestRuntimeOnly("io.r2dbc:r2dbc-mssql") - dockerTestRuntimeOnly("org.postgresql:postgresql") - dockerTestRuntimeOnly("org.postgresql:r2dbc-postgresql") - - implementation("com.fasterxml.jackson.core:jackson-databind") - implementation("com.fasterxml.jackson.module:jackson-module-parameter-names") - - optional(project(":spring-boot-project:spring-boot-activemq")) - optional(project(":spring-boot-project:spring-boot-amqp")) - optional(project(":spring-boot-project:spring-boot-artemis")) - optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all")) - optional(project(":spring-boot-project:spring-boot-cassandra")) - optional(project(":spring-boot-project:spring-boot-data-redis")) - optional(project(":spring-boot-project:spring-boot-elasticsearch")) - optional(project(":spring-boot-project:spring-boot-flyway")) - optional(project(":spring-boot-project:spring-boot-hazelcast")) - optional(project(":spring-boot-project:spring-boot-jdbc")) - optional(project(":spring-boot-project:spring-boot-ldap")) - optional(project(":spring-boot-project:spring-boot-liquibase")) - optional(project(":spring-boot-project:spring-boot-metrics")) - optional(project(":spring-boot-project:spring-boot-mongodb")) - optional(project(":spring-boot-project:spring-boot-neo4j")) - optional(project(":spring-boot-project:spring-boot-opentelemetry")) - optional(project(":spring-boot-project:spring-boot-pulsar")) - optional(project(":spring-boot-project:spring-boot-r2dbc")) - optional(project(":spring-boot-project:spring-boot-tracing")) - optional(project(":spring-boot-project:spring-boot-zipkin")) - optional("com.hazelcast:hazelcast") - optional("org.mongodb:mongodb-driver-core") - optional("org.neo4j.driver:neo4j-java-driver") - optional("org.springframework.data:spring-data-r2dbc") - - testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) - testImplementation(project(":spring-boot-project:spring-boot-test")) - testImplementation("ch.qos.logback:logback-classic") -} - -tasks.named("javadoc") { - enabled = false -} diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories deleted file mode 100644 index c67c253218..0000000000 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,5 +0,0 @@ -# Connection Details Factories -org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryLoggingDockerComposeConnectionDetailsFactory,\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryMetricsDockerComposeConnectionDetailsFactory,\ -org.springframework.boot.docker.compose.service.connection.otlp.OpenTelemetryTracingDockerComposeConnectionDetailsFactory diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index a829dd02a4..5a2435011f 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -241,7 +241,6 @@ dependencies { implementation(project(path: ":spring-boot-project:spring-boot-data-neo4j")) implementation(project(path: ":spring-boot-project:spring-boot-devtools")) implementation(project(path: ":spring-boot-project:spring-boot-docker-compose")) - implementation(project(path: ":spring-boot-project:spring-boot-docker-compose-all")) implementation(project(path: ":spring-boot-project:spring-boot-http-converter")) implementation(project(path: ":spring-boot-project:spring-boot-http-codec")) implementation(project(path: ":spring-boot-project:spring-boot-integration")) diff --git a/spring-boot-project/spring-boot-metrics/build.gradle b/spring-boot-project/spring-boot-metrics/build.gradle index 8c50d544a8..8109c0465a 100644 --- a/spring-boot-project/spring-boot-metrics/build.gradle +++ b/spring-boot-project/spring-boot-metrics/build.gradle @@ -17,6 +17,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-opentelemetry")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("ch.qos.logback:logback-classic") @@ -48,6 +49,7 @@ dependencies { optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("io.rest-assured:rest-assured") dockerTestImplementation("org.testcontainers:junit-jupiter") diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java index 23e7f50a9d..e1d7e68992 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/GrafanaOpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java index c613514caa..c1ca77d6ec 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-metrics/src/dockerTest/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/resources/org/springframework/boot/docker/compose/service/connection/otlp/otlp-compose.yaml b/spring-boot-project/spring-boot-metrics/src/dockerTest/resources/org/springframework/boot/metrics/docker/compose/otlp/otlp-compose.yaml similarity index 100% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/resources/org/springframework/boot/docker/compose/service/connection/otlp/otlp-compose.yaml rename to spring-boot-project/spring-boot-metrics/src/dockerTest/resources/org/springframework/boot/metrics/docker/compose/otlp/otlp-compose.yaml diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java index fc1cc1b554..a68258b540 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/OpenTelemetryMetricsDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java similarity index 74% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java rename to spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java index 3a6c89de0b..ac1537810f 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/package-info.java +++ b/spring-boot-project/spring-boot-metrics/src/main/java/org/springframework/boot/metrics/docker/compose/otlp/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,6 @@ */ /** - * Support for Docker Compose OpenTelemetry service connections. + * Support for Docker Compose OpenTelemetry metrics service connections. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.metrics.docker.compose.otlp; diff --git a/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories index 8f7d162eaa..fc13ca12bd 100644 --- a/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-metrics/src/main/resources/META-INF/spring.factories @@ -1,5 +1,6 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.metrics.docker.compose.otlp.OpenTelemetryMetricsDockerComposeConnectionDetailsFactory,\ org.springframework.boot.metrics.testcontainers.otlp.GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory,\ org.springframework.boot.metrics.testcontainers.otlp.OpenTelemetryMetricsContainerConnectionDetailsFactory diff --git a/spring-boot-project/spring-boot-opentelemetry/build.gradle b/spring-boot-project/spring-boot-opentelemetry/build.gradle index 04e3ecdbd7..38d848bb8a 100644 --- a/spring-boot-project/spring-boot-opentelemetry/build.gradle +++ b/spring-boot-project/spring-boot-opentelemetry/build.gradle @@ -16,11 +16,13 @@ dependencies { optional(project(":spring-boot-project:spring-boot-autoconfigure")) optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("io.opentelemetry:opentelemetry-exporter-otlp") optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("org.testcontainers:junit-jupiter") testImplementation(project(":spring-boot-project:spring-boot-test")) diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 4aa5372a7b..a521d4c684 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/GrafanaOpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java index f6ed006014..bd55ef82b0 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml new file mode 100644 index 0000000000..86e0547541 --- /dev/null +++ b/spring-boot-project/spring-boot-opentelemetry/src/dockerTest/resources/org/springframework/boot/opentelemetry/docker/compose/otlp-compose.yaml @@ -0,0 +1,6 @@ +services: + otlp: + image: '{imageName}' + ports: + - '4317' + - '4318' diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java index 63205d9c9a..a595ee1c55 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/OpenTelemetryLoggingDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.opentelemetry.docker.compose; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java new file mode 100644 index 0000000000..c71c7016c2 --- /dev/null +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/java/org/springframework/boot/opentelemetry/docker/compose/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Support for Docker Compose OpenTelemetry logging service connections. + */ +package org.springframework.boot.opentelemetry.docker.compose; diff --git a/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories index bc0547c4cf..c0e36edc18 100644 --- a/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-opentelemetry/src/main/resources/META-INF/spring.factories @@ -1,4 +1,5 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.opentelemetry.docker.compose.OpenTelemetryLoggingDockerComposeConnectionDetailsFactory,\ org.springframework.boot.opentelemetry.testcontainers.GrafanaOpenTelemetryLoggingContainerConnectionDetailsFactory,\ -org.springframework.boot.opentelemetry.testcontainers.OpenTelemetryLoggingContainerConnectionDetailsFactory +org.springframework.boot.opentelemetry.testcontainers.OpenTelemetryLoggingContainerConnectionDetailsFactory \ No newline at end of file diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 50fa5c54c5..c5a644726c 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -22,7 +22,6 @@ dependencies { dockerTestImplementation(project(":spring-boot-project:spring-boot-data-mongodb")) dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose")) - dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose-all")) dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers")) dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) dockerTestImplementation(project(":spring-boot-project:spring-boot-tx")) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle index 6887e2b7c1..65dcca7ef2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/build.gradle @@ -78,7 +78,6 @@ dependencies { mavenRepository(project(path: ":spring-boot-project:spring-boot-test", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "mavenRepository")) - mavenRepository(project(path: ":spring-boot-project:spring-boot-docker-compose-all", configuration: "mavenRepository")) mavenRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-parent", configuration: "mavenRepository")) versionProperties(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "resolvedBom")) diff --git a/spring-boot-project/spring-boot-tracing/build.gradle b/spring-boot-project/spring-boot-tracing/build.gradle index 0d8c079599..c2c167946e 100644 --- a/spring-boot-project/spring-boot-tracing/build.gradle +++ b/spring-boot-project/spring-boot-tracing/build.gradle @@ -18,6 +18,7 @@ dependencies { optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-docker-compose")) optional(project(":spring-boot-project:spring-boot-metrics")) optional(project(":spring-boot-project:spring-boot-testcontainers")) optional("io.micrometer:micrometer-core") @@ -32,6 +33,7 @@ dependencies { optional("org.testcontainers:grafana") dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker")) + dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-docker-compose"))) dockerTestImplementation("org.testcontainers:junit-jupiter") testImplementation(project(":spring-boot-project:spring-boot-opentelemetry")) diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 82c8f60f90..4feabfc932 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/GrafanaOpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java similarity index 95% rename from spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java rename to spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java index 7f9fb9a805..8e8b8c455b 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactoryIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest; import org.springframework.boot.testsupport.container.TestImage; diff --git a/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml b/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml new file mode 100644 index 0000000000..86e0547541 --- /dev/null +++ b/spring-boot-project/spring-boot-tracing/src/dockerTest/resources/org/springframework/boot/tracing/docker/compose/otlp/otlp-compose.yaml @@ -0,0 +1,6 @@ +services: + otlp: + image: '{imageName}' + ports: + - '4317' + - '4318' diff --git a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java similarity index 97% rename from spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java rename to spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java index bc8c1158e3..fc40339a7a 100644 --- a/spring-boot-project/spring-boot-docker-compose-all/src/main/java/org/springframework/boot/docker/compose/service/connection/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java +++ b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/OpenTelemetryTracingDockerComposeConnectionDetailsFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docker.compose.service.connection.otlp; +package org.springframework.boot.tracing.docker.compose.otlp; import org.springframework.boot.docker.compose.core.RunningService; import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory; diff --git a/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java new file mode 100644 index 0000000000..9ee52c3591 --- /dev/null +++ b/spring-boot-project/spring-boot-tracing/src/main/java/org/springframework/boot/tracing/docker/compose/otlp/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2012-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Support for Docker Compose OpenTelemetry tracing service connections. + */ +package org.springframework.boot.tracing.docker.compose.otlp; diff --git a/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories index ba1aa27ae0..bf812ffd84 100644 --- a/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-tracing/src/main/resources/META-INF/spring.factories @@ -1,5 +1,6 @@ # Connection Details Factories org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ +org.springframework.boot.tracing.docker.compose.otlp.OpenTelemetryTracingDockerComposeConnectionDetailsFactory,\ org.springframework.boot.tracing.testcontainers.otlp.GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory,\ org.springframework.boot.tracing.testcontainers.otlp.OpenTelemetryTracingContainerConnectionDetailsFactory @@ -11,3 +12,4 @@ org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansA org.springframework.boot.env.EnvironmentPostProcessor=\ org.springframework.boot.tracing.autoconfigure.LogCorrelationEnvironmentPostProcessor +