From e5af13931c94676739d7b2d24cefd275491fb7a1 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Fri, 12 Jul 2024 21:07:53 +0200 Subject: [PATCH] rename spring autoconfigure to autoconfigure-2 (#11800) --- .../customchecks/OtelInternalJavadoc.java | 2 +- .../intellij-setup-and-troubleshooting.md | 2 +- docs/contributing/selectModules.kts | 2 +- .../README.md | 0 .../build.gradle.kts | 5 +--- .../v2}/OpenTelemetryAutoConfiguration.java | 18 +++++++-------- .../ConditionalOnEnabledInstrumentation.java | 2 +- .../InstrumentationPropertyEnabled.java | 2 +- .../v2}/internal/MapConverter.java | 2 +- .../v2}/internal/SdkEnabled.java | 2 +- ...mentationAnnotationsAutoConfiguration.java | 11 ++++++--- .../InstrumentationWithSpanAspect.java | 2 +- .../annotations/JoinPointRequest.java | 2 +- .../JointPointCodeAttributesExtractor.java | 2 +- .../annotations/WithSpanAspect.java | 4 ++-- ...spectParameterAttributeNamesExtractor.java | 2 +- .../jdbc/DataSourcePostProcessor.java | 4 ++-- .../JdbcInstrumentationAutoConfiguration.java | 8 +++++-- ...ListenerContainerFactoryPostProcessor.java | 2 +- ...KafkaInstrumentationAutoConfiguration.java | 8 +++++-- .../LogbackAppenderApplicationListener.java | 6 ++++- .../logging/LogbackAppenderInstaller.java | 2 +- ...penTelemetryAppenderAutoConfiguration.java | 8 +++++-- .../MicrometerBridgeAutoConfiguration.java | 8 +++++-- ...lientInstrumentationAutoConfiguration.java | 10 +++++--- ...R2dbcInstrumentationAutoConfiguration.java | 8 +++++-- .../R2dbcInstrumentingPostProcessor.java | 4 ++-- .../web/RestTemplateBeanPostProcessor.java | 2 +- .../web/RestTemplateInstrumentation.java | 4 ++-- ...ngWebInstrumentationAutoConfiguration.java | 9 +++++--- ...bfluxInstrumentationAutoConfiguration.java | 9 +++++--- .../webflux/WebClientBeanPostProcessor.java | 4 ++-- ...bMvc5InstrumentationAutoConfiguration.java | 10 +++++--- .../properties/ConfigPropertiesBridge.java | 2 +- .../properties/InstrumentationConfigUtil.java | 2 +- .../properties/OtelResourceProperties.java | 2 +- .../properties/OtlpExporterProperties.java | 2 +- .../properties/PropagationProperties.java | 2 +- .../properties/SpringConfigProperties.java | 2 +- .../DistroVersionResourceProvider.java | 4 ++-- .../resources/SpringResourceProvider.java | 2 +- ...itional-spring-configuration-metadata.json | 0 .../resource-config.json | 0 .../main/resources/META-INF/spring.factories | 15 ++++++++++++ ...ot.autoconfigure.AutoConfiguration.imports | 10 ++++++++ .../OpenTelemetryAutoConfigurationTest.java | 2 +- ...ationAnnotationsAutoConfigurationTest.java | 2 +- .../InstrumentationWithSpanAspectTest.java | 2 +- ...MicrometerBridgeAutoConfigurationTest.java | 2 +- ...cInstrumentationAutoConfigurationTest.java | 2 +- ...bInstrumentationAutoConfigurationTest.java | 2 +- ...xInstrumentationAutoConfigurationTest.java | 2 +- .../WebClientBeanPostProcessorTest.java | 2 +- ...Instrumentation5AutoConfigurationTest.java | 2 +- .../OtlpExporterPropertiesTest.java | 8 ++----- .../DistroVersionResourceProviderTest.java | 4 ++-- .../resources/SpringConfigPropertiesTest.java | 12 +++++----- .../resources/SpringResourceProviderTest.java | 13 +++++------ .../logging/LogbackAppenderTest.java | 2 +- .../resources/logback-test.xml | 0 .../logging/LogbackMissingTest.java | 2 +- .../build.gradle.kts | 9 ++++---- .../OpenTelemetryAnnotationsRuntimeHints.java | 4 ++-- .../web/RestClientBeanPostProcessor.java | 6 ++--- ...lientInstrumentationAutoConfiguration.java | 9 +++++--- ...bMvc6InstrumentationAutoConfiguration.java | 10 +++++--- .../main/resources/META-INF/spring.factories | 2 -- .../resources/META-INF/spring/aot.factories | 2 +- ...ot.autoconfigure.AutoConfiguration.imports | 3 ++- ...tInstrumentationAutoConfigurationTest.java | 2 +- ...Instrumentation6AutoConfigurationTest.java | 2 +- .../autoconfigure/EnableOpenTelemetry.java | 23 ------------------- .../main/resources/META-INF/spring.factories | 15 ------------ ...ot.autoconfigure.AutoConfiguration.imports | 11 --------- .../spring-boot-starter/build.gradle.kts | 2 +- .../zipkin-spring-boot-starter/README.md | 4 ++-- settings.gradle.kts | 2 +- ...bstractJvmKafkaSpringStarterSmokeTest.java | 4 ++-- ...tractJvmMongodbSpringStarterSmokeTest.java | 4 ++-- .../AbstractOtelSpringStarterSmokeTest.java | 8 +++---- .../spring-smoke-testing/build.gradle.kts | 2 +- 81 files changed, 205 insertions(+), 187 deletions(-) rename instrumentation/spring/{spring-boot-autoconfigure => spring-boot-autoconfigure-2}/README.md (100%) rename instrumentation/spring/{spring-boot-autoconfigure => spring-boot-autoconfigure-2}/build.gradle.kts (94%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/OpenTelemetryAutoConfiguration.java (87%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/ConditionalOnEnabledInstrumentation.java (91%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/InstrumentationPropertyEnabled.java (94%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/MapConverter.java (93%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/SdkEnabled.java (89%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java (71%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/InstrumentationWithSpanAspect.java (90%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/JoinPointRequest.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/JointPointCodeAttributesExtractor.java (84%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/WithSpanAspect.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/jdbc/DataSourcePostProcessor.java (90%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java (80%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java (84%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/logging/LogbackAppenderApplicationListener.java (91%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/logging/LogbackAppenderInstaller.java (98%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java (82%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java (81%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java (76%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java (79%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java (91%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/web/RestTemplateBeanPostProcessor.java (92%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/web/RestTemplateInstrumentation.java (87%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java (83%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java (81%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webflux/WebClientBeanPostProcessor.java (92%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java (75%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/ConfigPropertiesBridge.java (96%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/InstrumentationConfigUtil.java (96%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/OtelResourceProperties.java (88%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/OtlpExporterProperties.java (93%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/PropagationProperties.java (88%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/properties/SpringConfigProperties.java (98%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/resources/DistroVersionResourceProvider.java (91%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/internal/resources/SpringResourceProvider.java (94%) rename instrumentation/spring/{spring-boot-autoconfigure => spring-boot-autoconfigure-2}/src/main/resources/META-INF/additional-spring-configuration-metadata.json (100%) rename instrumentation/spring/{spring-boot-autoconfigure => spring-boot-autoconfigure-2}/src/main/resources/META-INF/native-image/io.opentelemetry.instrumentation/opentelemetry-spring-boot/resource-config.json (100%) create mode 100644 instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring.factories create mode 100644 instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2}/OpenTelemetryAutoConfigurationTest.java (98%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java (92%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/annotations/InstrumentationWithSpanAspectTest.java (99%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java (96%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java (97%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webflux/WebClientBeanPostProcessorTest.java (97%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java (95%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/properties/OtlpExporterPropertiesTest.java (86%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/resources/DistroVersionResourceProviderTest.java (91%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/resources/SpringConfigPropertiesTest.java (80%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/resources/SpringResourceProviderTest.java (81%) rename instrumentation/spring/{spring-boot-autoconfigure/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/logging/LogbackAppenderTest.java (97%) rename instrumentation/spring/{spring-boot-autoconfigure => spring-boot-autoconfigure-2}/src/testLogbackAppender/resources/logback-test.xml (100%) rename instrumentation/spring/{spring-boot-autoconfigure/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-2/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal}/instrumentation/logging/LogbackMissingTest.java (87%) rename instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/{ => v3/internal}/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java (79%) rename instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/{ => v3/internal}/instrumentation/web/RestClientBeanPostProcessor.java (89%) rename instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/{ => v3/internal}/instrumentation/web/RestClientInstrumentationAutoConfiguration.java (83%) rename instrumentation/spring/{spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal}/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java (75%) delete mode 100644 instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring.factories rename instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/{ => v3/internal}/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java (96%) rename instrumentation/spring/{spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure => spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal}/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java (95%) delete mode 100644 instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/EnableOpenTelemetry.java delete mode 100644 instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories delete mode 100644 instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadoc.java b/custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadoc.java index 950632166bd3..3d6693a9574e 100644 --- a/custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadoc.java +++ b/custom-checks/src/main/java/io/opentelemetry/javaagent/customchecks/OtelInternalJavadoc.java @@ -42,7 +42,7 @@ public class OtelInternalJavadoc extends BugChecker implements BugChecker.ClassT @Override public Description matchClass(ClassTree tree, VisitorState state) { - if (!isPublic(tree) || !isInternal(state)) { + if (!isPublic(tree) || !isInternal(state) || tree.getSimpleName().toString().endsWith("Test")) { return Description.NO_MATCH; } String javadoc = getJavadoc(state); diff --git a/docs/contributing/intellij-setup-and-troubleshooting.md b/docs/contributing/intellij-setup-and-troubleshooting.md index 4bc57ac18d70..0b47b066eabf 100644 --- a/docs/contributing/intellij-setup-and-troubleshooting.md +++ b/docs/contributing/intellij-setup-and-troubleshooting.md @@ -35,7 +35,7 @@ If you are working on a specific instrumentation, you can load only the modules For example, to load the modules for the Spring Boot autoconfigure instrumentation, run: ```shell -./docs/contributing/selectModules.kts instrumentation/spring/spring-boot-autoconfigure/ +./docs/contributing/selectModules.kts instrumentation/spring/spring-boot-autoconfigure-2/ ``` Install the [Kotlin executable](https://kotlinlang.org/docs/tutorials/command-line.html) diff --git a/docs/contributing/selectModules.kts b/docs/contributing/selectModules.kts index d0f299d42125..ce9508197f2b 100755 --- a/docs/contributing/selectModules.kts +++ b/docs/contributing/selectModules.kts @@ -12,7 +12,7 @@ main(args) fun main(args: Array) { if (args.isEmpty()) { - println("Usage: ./docs/contributing/selectModules.kts instrumentation/spring/spring-boot-autoconfigure/ ...") + println("Usage: ./docs/contributing/selectModules.kts instrumentation/spring/spring-boot-autoconfigure-2/ ...") return } diff --git a/instrumentation/spring/spring-boot-autoconfigure/README.md b/instrumentation/spring/spring-boot-autoconfigure-2/README.md similarity index 100% rename from instrumentation/spring/spring-boot-autoconfigure/README.md rename to instrumentation/spring/spring-boot-autoconfigure-2/README.md diff --git a/instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts b/instrumentation/spring/spring-boot-autoconfigure-2/build.gradle.kts similarity index 94% rename from instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts rename to instrumentation/spring/spring-boot-autoconfigure-2/build.gradle.kts index 4356534ad15e..b637006b2226 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts +++ b/instrumentation/spring/spring-boot-autoconfigure-2/build.gradle.kts @@ -2,8 +2,7 @@ plugins { id("otel.library-instrumentation") } -// Name the Spring Boot modules in accordance with https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.developing-auto-configuration.custom-starter -base.archivesName.set("opentelemetry-spring-boot") +base.archivesName.set("opentelemetry-autoconfigure-spring-boot-2") group = "io.opentelemetry.instrumentation" val springBootVersion = "2.7.18" // AutoConfiguration is added in 2.7.0, but can be used with older versions @@ -33,9 +32,7 @@ dependencies { implementation(project(":instrumentation:spring:spring-kafka-2.7:library")) implementation(project(":instrumentation:spring:spring-web:spring-web-3.1:library")) implementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-5.3:library")) - implementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library")) compileOnly("javax.servlet:javax.servlet-api:3.1.0") - compileOnly("jakarta.servlet:jakarta.servlet-api:5.0.0") implementation(project(":instrumentation:spring:spring-webflux:spring-webflux-5.3:library")) implementation(project(":instrumentation:micrometer:micrometer-1.5:library")) implementation(project(":instrumentation:log4j:log4j-appender-2.17:library")) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfiguration.java similarity index 87% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfiguration.java index eaa97f6c23a4..f3f936f37693 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfiguration.java @@ -3,18 +3,18 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.trace.TracerProvider; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.MapConverter; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.SdkEnabled; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.SpringConfigProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.resources.DistroVersionResourceProvider; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.resources.SpringResourceProvider; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.MapConverter; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.SdkEnabled; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtelResourceProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtlpExporterProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.PropagationProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.SpringConfigProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources.DistroVersionResourceProvider; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources.SpringResourceProvider; import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk; import io.opentelemetry.sdk.autoconfigure.internal.AutoConfigureUtil; import io.opentelemetry.sdk.autoconfigure.internal.ComponentLoader; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/ConditionalOnEnabledInstrumentation.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/ConditionalOnEnabledInstrumentation.java similarity index 91% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/ConditionalOnEnabledInstrumentation.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/ConditionalOnEnabledInstrumentation.java index 7c55f430d1e4..e54ca70fa971 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/ConditionalOnEnabledInstrumentation.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/ConditionalOnEnabledInstrumentation.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal; import io.opentelemetry.api.OpenTelemetry; import java.lang.annotation.ElementType; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/InstrumentationPropertyEnabled.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/InstrumentationPropertyEnabled.java similarity index 94% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/InstrumentationPropertyEnabled.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/InstrumentationPropertyEnabled.java index 87687f668b6c..ef049fa7eed1 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/InstrumentationPropertyEnabled.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/InstrumentationPropertyEnabled.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal; import java.util.Map; import org.springframework.context.annotation.Condition; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/MapConverter.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/MapConverter.java similarity index 93% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/MapConverter.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/MapConverter.java index 86e043bf1696..94344c8dadda 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/MapConverter.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/MapConverter.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; import java.util.Collections; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/SdkEnabled.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/SdkEnabled.java similarity index 89% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/SdkEnabled.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/SdkEnabled.java index 082bdebc00b7..871d23ca712c 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/SdkEnabled.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/SdkEnabled.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal; import org.springframework.boot.autoconfigure.condition.AnyNestedCondition; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java similarity index 71% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java index 052f499d4a1c..a0d9c83e9fd6 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfiguration.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.annotations.WithSpan; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import org.aspectj.lang.annotation.Aspect; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.context.annotation.Bean; @@ -15,7 +15,12 @@ import org.springframework.core.DefaultParameterNameDiscoverer; import org.springframework.core.ParameterNameDiscoverer; -/** Configures {@link WithSpanAspect} to trace bean methods annotated with {@link WithSpan}. */ +/** + * Configures {@link WithSpanAspect} to trace bean methods annotated with {@link WithSpan}. + * + *

This class is internal and is hence not for public use. Its APIs are unstable and can change + * at any time. + */ @ConditionalOnEnabledInstrumentation(module = "annotations") @ConditionalOnClass(Aspect.class) @Configuration diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspect.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspect.java similarity index 90% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspect.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspect.java index 5cf80fce7ecc..2eda95bfdda1 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspect.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspect.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.api.OpenTelemetry; import org.aspectj.lang.ProceedingJoinPoint; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JoinPointRequest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JoinPointRequest.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JoinPointRequest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JoinPointRequest.java index a308bc80fd12..817546cd0727 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JoinPointRequest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JoinPointRequest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.instrumentation.annotations.WithSpan; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JointPointCodeAttributesExtractor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JointPointCodeAttributesExtractor.java similarity index 84% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JointPointCodeAttributesExtractor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JointPointCodeAttributesExtractor.java index 1077a35c07ce..043392a8cd62 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/JointPointCodeAttributesExtractor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/JointPointCodeAttributesExtractor.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.instrumentation.api.incubator.semconv.code.CodeAttributesGetter; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspect.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspect.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspect.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspect.java index 246deef6f61a..b07a66f8e451 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspect.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspect.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.trace.Span; @@ -28,7 +28,7 @@ * can not be applied to constructors. */ abstract class WithSpanAspect { - private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-boot-autoconfigure"; + private static final String INSTRUMENTATION_NAME = "io.opentelemetry.spring-boot-autoconfigure-2"; private final Instrumenter instrumenter; private final JoinPointRequest.Factory requestFactory; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java index 6c81c7dde0df..19f66be02daa 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/WithSpanAspectParameterAttributeNamesExtractor.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import io.opentelemetry.instrumentation.annotations.SpanAttribute; import io.opentelemetry.instrumentation.api.annotation.support.ParameterAttributeNamesExtractor; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/DataSourcePostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/DataSourcePostProcessor.java similarity index 90% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/DataSourcePostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/DataSourcePostProcessor.java index f0884f171e1f..104b93594133 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/DataSourcePostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/DataSourcePostProcessor.java @@ -3,12 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.jdbc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.jdbc; import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.jdbc.datasource.JdbcTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import javax.sql.DataSource; import org.springframework.aop.scope.ScopedProxyUtils; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java similarity index 80% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java index 2e012f97687c..42772394264c 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/jdbc/JdbcInstrumentationAutoConfiguration.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.jdbc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.jdbc; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import javax.sql.DataSource; import org.springframework.beans.factory.ObjectProvider; @@ -16,6 +16,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnEnabledInstrumentation(module = "jdbc") @AutoConfiguration(after = DataSourceAutoConfiguration.class) @ConditionalOnBean({DataSource.class}) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java index c746a72014c9..daeb9332c446 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/ConcurrentKafkaListenerContainerFactoryPostProcessor.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.kafka; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.kafka; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.spring.kafka.v2_7.SpringKafkaTelemetry; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java similarity index 84% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java index 1eab4c4e6346..83b35db656ff 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/kafka/KafkaInstrumentationAutoConfiguration.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.kafka; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.kafka; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.kafkaclients.v2_6.KafkaTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -17,6 +17,10 @@ import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; import org.springframework.kafka.core.KafkaTemplate; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnEnabledInstrumentation(module = "kafka") @ConditionalOnClass({KafkaTemplate.class, ConcurrentKafkaListenerContainerFactory.class}) @Configuration diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderApplicationListener.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderApplicationListener.java similarity index 91% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderApplicationListener.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderApplicationListener.java index 646e8119bc01..208e285e0647 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderApplicationListener.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderApplicationListener.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging; import org.springframework.boot.SpringApplication; import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; @@ -13,6 +13,10 @@ import org.springframework.context.event.GenericApplicationListener; import org.springframework.core.ResolvableType; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ public class LogbackAppenderApplicationListener implements GenericApplicationListener { private static final Class[] SOURCE_TYPES = { diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderInstaller.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderInstaller.java similarity index 98% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderInstaller.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderInstaller.java index 811dacb31bf7..f68815a7d8a8 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderInstaller.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderInstaller.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.spi.ILoggingEvent; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java similarity index 82% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java index b9bb519f61ce..2423a7022783 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/OpenTelemetryAppenderAutoConfiguration.java @@ -3,16 +3,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @Configuration @SuppressWarnings("OtelPrivateConstructorForUtilityClass") public class OpenTelemetryAppenderAutoConfiguration { diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java similarity index 81% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java index 8be9811fa84d..716ef47261a0 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfiguration.java @@ -3,13 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.micrometer; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.micrometer; import io.micrometer.core.instrument.Clock; import io.micrometer.core.instrument.MeterRegistry; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.micrometer.v1_5.OpenTelemetryMeterRegistry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegistryAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfigureAfter; @@ -19,6 +19,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnEnabledInstrumentation(module = "micrometer", enabledByDefault = false) @AutoConfigureAfter(MetricsAutoConfiguration.class) @AutoConfigureBefore(CompositeMeterRegistryAutoConfiguration.class) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java similarity index 76% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java index 7885c2088aea..04cd707e456e 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/mongo/MongoClientInstrumentationAutoConfiguration.java @@ -3,13 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.mongo; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.mongo; import com.mongodb.MongoClientSettings; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.mongo.v3_1.MongoTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -17,6 +17,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnBean(OpenTelemetry.class) @ConditionalOnClass(MongoClientSettings.class) @ConditionalOnEnabledInstrumentation(module = "mongo") diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java similarity index 79% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java index 5c9a3b62665a..303e631cfd20 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentationAutoConfiguration.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.r2dbc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.r2dbc; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.r2dbc.spi.ConnectionFactory; import org.springframework.beans.factory.ObjectProvider; @@ -15,6 +15,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnBean(OpenTelemetry.class) @ConditionalOnClass(ConnectionFactory.class) @ConditionalOnEnabledInstrumentation(module = "r2dbc") diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java similarity index 91% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java index 95ad7aad333c..815e735d87d9 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2dbcInstrumentingPostProcessor.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.r2dbc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.r2dbc; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.r2dbc.v1_0.R2dbcTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.r2dbc.spi.ConnectionFactory; import io.r2dbc.spi.ConnectionFactoryOptions; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateBeanPostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateBeanPostProcessor.java similarity index 92% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateBeanPostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateBeanPostProcessor.java index 096e97c83061..9e8fda03d009 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateBeanPostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateBeanPostProcessor.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateInstrumentation.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateInstrumentation.java similarity index 87% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateInstrumentation.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateInstrumentation.java index 6cd79283afae..8097c4d2d921 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestTemplateInstrumentation.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/RestTemplateInstrumentation.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web; import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.instrumentation.spring.web.v3_1.SpringWebTelemetry; import io.opentelemetry.instrumentation.spring.web.v3_1.internal.WebTelemetryUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java similarity index 83% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java index 7fed019fe527..5a1df99aba65 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfiguration.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -18,7 +18,10 @@ /** * Configures {@link RestTemplate} for tracing. * - *

Adds Open Telemetry instrumentation to RestTemplate beans after initialization + *

Adds Open Telemetry instrumentation to RestTemplate beans after initialization. + * + *

This class is internal and is hence not for public use. Its APIs are unstable and can change + * at any time. */ @ConditionalOnEnabledInstrumentation(module = "spring-web") @ConditionalOnClass(RestTemplate.class) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java similarity index 81% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java index 7a0cc4f29d91..564269156aa7 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfiguration.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -18,7 +18,10 @@ /** * Configures {@link WebClient} for tracing. * - *

Adds Open Telemetry instrumentation to WebClient beans after initialization + *

Adds Open Telemetry instrumentation to WebClient beans after initialization. + * + *

This class is internal and is hence not for public use. Its APIs are unstable and can change + * at any time. */ @ConditionalOnEnabledInstrumentation(module = "spring-webflux") @ConditionalOnClass(WebClient.class) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessor.java similarity index 92% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessor.java index d4a995da8297..651a38e9fa9e 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessor.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.instrumentation.spring.webflux.v5_3.SpringWebfluxTelemetry; import io.opentelemetry.instrumentation.spring.webflux.v5_3.internal.SpringWebfluxBuilderUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java similarity index 75% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java index ccd077a42d09..a3c3ca3e8778 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvc5InstrumentationAutoConfiguration.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webmvc; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.instrumentation.spring.webmvc.v5_3.SpringWebMvcTelemetry; import io.opentelemetry.instrumentation.spring.webmvc.v5_3.internal.SpringMvcBuilderUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; @@ -18,6 +18,10 @@ import org.springframework.web.filter.OncePerRequestFilter; import org.springframework.web.servlet.DispatcherServlet; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnEnabledInstrumentation(module = "spring-webmvc") @ConditionalOnClass({Filter.class, OncePerRequestFilter.class, DispatcherServlet.class}) @Configuration diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/ConfigPropertiesBridge.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/ConfigPropertiesBridge.java similarity index 96% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/ConfigPropertiesBridge.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/ConfigPropertiesBridge.java index 49d50f94cc5c..156b95a92d21 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/ConfigPropertiesBridge.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/ConfigPropertiesBridge.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import io.opentelemetry.instrumentation.api.incubator.config.internal.InstrumentationConfig; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/InstrumentationConfigUtil.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/InstrumentationConfigUtil.java similarity index 96% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/InstrumentationConfigUtil.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/InstrumentationConfigUtil.java index 747cf33dcb09..a0dfae102e13 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/InstrumentationConfigUtil.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/InstrumentationConfigUtil.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import com.google.errorprone.annotations.CanIgnoreReturnValue; import io.opentelemetry.instrumentation.api.incubator.builder.internal.DefaultHttpClientInstrumenterBuilder; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtelResourceProperties.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtelResourceProperties.java similarity index 88% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtelResourceProperties.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtelResourceProperties.java index 0bb967079537..7cd552ea17ae 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtelResourceProperties.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtelResourceProperties.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import java.util.Collections; import java.util.Map; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtlpExporterProperties.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterProperties.java similarity index 93% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtlpExporterProperties.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterProperties.java index b159d10b80f3..f4c706dccfa0 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/OtlpExporterProperties.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterProperties.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import java.util.HashMap; import java.util.Map; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/PropagationProperties.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/PropagationProperties.java similarity index 88% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/PropagationProperties.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/PropagationProperties.java index 4b582ac3fc2c..53056c5506fe 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/PropagationProperties.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/PropagationProperties.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import java.util.Collections; import java.util.List; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigProperties.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/SpringConfigProperties.java similarity index 98% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigProperties.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/SpringConfigProperties.java index c2a4f10aca1f..9b9b67038513 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigProperties.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/SpringConfigProperties.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import io.opentelemetry.exporter.otlp.internal.OtlpConfigUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/DistroVersionResourceProvider.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProvider.java similarity index 91% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/DistroVersionResourceProvider.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProvider.java index 8ba185f97b98..755f14559677 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/DistroVersionResourceProvider.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProvider.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.resources; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources; import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; @@ -19,7 +19,7 @@ public class DistroVersionResourceProvider implements ResourceProvider { public static final String VERSION = - EmbeddedInstrumentationProperties.findVersion("io.opentelemetry.spring-boot-autoconfigure"); + EmbeddedInstrumentationProperties.findVersion("io.opentelemetry.spring-boot-autoconfigure-2"); private static final AttributeKey TELEMETRY_DISTRO_NAME = AttributeKey.stringKey("telemetry.distro.name"); diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/SpringResourceProvider.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProvider.java similarity index 94% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/SpringResourceProvider.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProvider.java index 5f562025764b..975bf1b3e46d 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/resources/SpringResourceProvider.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProvider.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.internal.resources; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/additional-spring-configuration-metadata.json similarity index 100% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/additional-spring-configuration-metadata.json diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/native-image/io.opentelemetry.instrumentation/opentelemetry-spring-boot/resource-config.json b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/native-image/io.opentelemetry.instrumentation/opentelemetry-spring-boot/resource-config.json similarity index 100% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/native-image/io.opentelemetry.instrumentation/opentelemetry-spring-boot/resource-config.json rename to instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/native-image/io.opentelemetry.instrumentation/opentelemetry-spring-boot/resource-config.json diff --git a/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring.factories b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring.factories new file mode 100644 index 000000000000..f06e51c2e314 --- /dev/null +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring.factories @@ -0,0 +1,15 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations.InstrumentationAnnotationsAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.kafka.KafkaInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging.OpenTelemetryAppenderAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.jdbc.JdbcInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.micrometer.MicrometerBridgeAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.r2dbc.R2dbcInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web.SpringWebInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux.SpringWebfluxInstrumentationAutoConfiguration,\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webmvc.SpringWebMvc5InstrumentationAutoConfiguration + +org.springframework.context.ApplicationListener=\ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging.LogbackAppenderApplicationListener diff --git a/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000000..f8be45c43e75 --- /dev/null +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,10 @@ +io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations.InstrumentationAnnotationsAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.kafka.KafkaInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging.OpenTelemetryAppenderAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.jdbc.JdbcInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.micrometer.MicrometerBridgeAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.r2dbc.R2dbcInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web.SpringWebInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux.SpringWebfluxInstrumentationAutoConfiguration diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfigurationTest.java similarity index 98% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfigurationTest.java index c13eb6e2fce7..0529c70e9e94 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/OpenTelemetryAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java similarity index 92% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java index a625252eacef..d9c9053b53ea 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationAnnotationsAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspectTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspectTest.java similarity index 99% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspectTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspectTest.java index 69f71af6d71b..9d6818b367bf 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/InstrumentationWithSpanAspectTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/annotations/InstrumentationWithSpanAspectTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations; import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.api.trace.SpanKind.CLIENT; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java index 753e660bf72e..2994c26414f4 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/micrometer/MicrometerBridgeAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.micrometer; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.micrometer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java similarity index 96% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java index b7bc9a25b997..118076a97dea 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/r2dbc/R2DbcInstrumentationAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.r2dbc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.r2dbc; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.testing.junit.LibraryInstrumentationExtension; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java similarity index 97% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java index 9091047c8432..108cb5d3efed 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/web/SpringWebInstrumentationAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.web; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java index ba1bca851cf7..6ec594630095 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/SpringWebfluxInstrumentationAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessorTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessorTest.java similarity index 97% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessorTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessorTest.java index 7289ea828950..5aca77fd32ce 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webflux/WebClientBeanPostProcessorTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webflux/WebClientBeanPostProcessorTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webflux; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java index fd3144b46e5b..31835cbe93c7 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/webmvc/SpringWebMvcInstrumentation5AutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.webmvc; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assumptions.assumeFalse; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/properties/OtlpExporterPropertiesTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterPropertiesTest.java similarity index 86% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/properties/OtlpExporterPropertiesTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterPropertiesTest.java index 4146a76a090f..4d6ea10115ae 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/properties/OtlpExporterPropertiesTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/properties/OtlpExporterPropertiesTest.java @@ -3,16 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.properties; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.entry; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.SpringConfigProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; import java.util.Arrays; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/DistroVersionResourceProviderTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProviderTest.java similarity index 91% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/DistroVersionResourceProviderTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProviderTest.java index 1454354fdbcf..e05fa73fc36c 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/DistroVersionResourceProviderTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/DistroVersionResourceProviderTest.java @@ -3,13 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.resources; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources; import static org.assertj.core.api.Assertions.assertThat; import com.google.common.collect.ImmutableMap; import io.opentelemetry.api.common.AttributeKey; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; import org.junit.jupiter.api.DisplayName; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringConfigPropertiesTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringConfigPropertiesTest.java similarity index 80% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringConfigPropertiesTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringConfigPropertiesTest.java index f9488ea49955..44cc94df327b 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringConfigPropertiesTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringConfigPropertiesTest.java @@ -3,16 +3,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.resources; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.entry; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.SpringConfigProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtelResourceProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtlpExporterProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.PropagationProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.SpringConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; import java.util.HashMap; import java.util.Map; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringResourceProviderTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProviderTest.java similarity index 81% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringResourceProviderTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProviderTest.java index c8187e6040db..001ebf398f5a 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/resources/SpringResourceProviderTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/resources/SpringResourceProviderTest.java @@ -3,14 +3,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.resources; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.resources; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.SpringConfigProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.resources.SpringResourceProvider; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtelResourceProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtlpExporterProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.PropagationProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.SpringConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; import io.opentelemetry.sdk.testing.assertj.AttributesAssert; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderTest.java similarity index 97% rename from instrumentation/spring/spring-boot-autoconfigure/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderTest.java index 9d1336b67ff6..818296833e76 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackAppenderTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackAppender/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackAppenderTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/testLogbackAppender/resources/logback-test.xml b/instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackAppender/resources/logback-test.xml similarity index 100% rename from instrumentation/spring/spring-boot-autoconfigure/src/testLogbackAppender/resources/logback-test.xml rename to instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackAppender/resources/logback-test.xml diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackMissingTest.java b/instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackMissingTest.java similarity index 87% rename from instrumentation/spring/spring-boot-autoconfigure/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackMissingTest.java rename to instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackMissingTest.java index 4afcc33f32aa..f4beb3e47205 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/logging/LogbackMissingTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-2/src/testLogbackMissing/java/io/opentelemetry/instrumentation/spring/autoconfigure/v2/internal/instrumentation/logging/LogbackMissingTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging; +package io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.logging; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/build.gradle.kts b/instrumentation/spring/spring-boot-autoconfigure-3/build.gradle.kts index 538de846c7e1..178691cc34bf 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/build.gradle.kts +++ b/instrumentation/spring/spring-boot-autoconfigure-3/build.gradle.kts @@ -2,8 +2,7 @@ plugins { id("otel.library-instrumentation") } -// Name the Spring Boot modules in accordance with https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.developing-auto-configuration.custom-starter -base.archivesName.set("opentelemetry-spring-boot-3") +base.archivesName.set("opentelemetry-autoconfigure-spring-boot-3") group = "io.opentelemetry.instrumentation" otelJava { @@ -13,11 +12,13 @@ otelJava { dependencies { val springBootVersion = "3.2.4" library("org.springframework.boot:spring-boot-starter-web:$springBootVersion") - implementation(project(":instrumentation:spring:spring-boot-autoconfigure")) + implementation(project(":instrumentation:spring:spring-boot-autoconfigure-2")) implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure") implementation(project(":instrumentation:spring:spring-web:spring-web-3.1:library")) + implementation(project(":instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library")) + compileOnly("jakarta.servlet:jakarta.servlet-api:5.0.0") - testImplementation(project(":instrumentation:spring:spring-boot-autoconfigure")) + testImplementation(project(":instrumentation:spring:spring-boot-autoconfigure-2")) testLibrary("org.springframework.boot:spring-boot-starter-test:$springBootVersion") { exclude("org.junit.vintage", "junit-vintage-engine") } diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java similarity index 79% rename from instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java index ae01b6efa4ac..a3b48085646b 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/annotations/OpenTelemetryAnnotationsRuntimeHints.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.annotations; import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; @@ -18,7 +18,7 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) { .reflection() .registerType( TypeReference.of( - "io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations.InstrumentationWithSpanAspect"), + "io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.annotations.InstrumentationWithSpanAspect"), hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS)); } } diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientBeanPostProcessor.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientBeanPostProcessor.java similarity index 89% rename from instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientBeanPostProcessor.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientBeanPostProcessor.java index afc7df6824b6..fd448ad77980 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientBeanPostProcessor.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientBeanPostProcessor.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.web; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.instrumentation.spring.web.v3_1.SpringWebTelemetry; import io.opentelemetry.instrumentation.spring.web.v3_1.internal.WebTelemetryUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; @@ -15,7 +15,7 @@ import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.web.client.RestClient; -public final class RestClientBeanPostProcessor implements BeanPostProcessor { +final class RestClientBeanPostProcessor implements BeanPostProcessor { private final ObjectProvider openTelemetryProvider; private final ObjectProvider configPropertiesProvider; diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfiguration.java similarity index 83% rename from instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfiguration.java index f261dbcd2324..ef5fcca64b0f 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfiguration.java @@ -3,10 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.web; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.AutoConfiguration; @@ -20,7 +20,10 @@ /** * Configures {@link RestClient} for tracing. * - *

Adds Open Telemetry instrumentation to {@link RestClient} beans after initialization + *

Adds Open Telemetry instrumentation to {@link RestClient} beans after initialization. + * + *

This class is internal and is hence not for public use. Its APIs are unstable and can change + * at any time. */ @ConditionalOnEnabledInstrumentation(module = "spring-web") @ConditionalOnClass(RestClient.class) diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java similarity index 75% rename from instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java index 18dd08df56ef..15ec1cf95d9b 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvc6InstrumentationAutoConfiguration.java @@ -3,11 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.webmvc; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.ConditionalOnEnabledInstrumentation; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.InstrumentationConfigUtil; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.ConditionalOnEnabledInstrumentation; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.InstrumentationConfigUtil; import io.opentelemetry.instrumentation.spring.webmvc.v6_0.SpringWebMvcTelemetry; import io.opentelemetry.instrumentation.spring.webmvc.v6_0.internal.SpringMvcBuilderUtil; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; @@ -18,6 +18,10 @@ import org.springframework.web.filter.OncePerRequestFilter; import org.springframework.web.servlet.DispatcherServlet; +/** + * This class is internal and is hence not for public use. Its APIs are unstable and can change at + * any time. + */ @ConditionalOnEnabledInstrumentation(module = "spring-webmvc") @ConditionalOnClass({Filter.class, OncePerRequestFilter.class, DispatcherServlet.class}) @Configuration diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring.factories b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 3aa46add58d1..000000000000 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web.RestClientInstrumentationAutoConfiguration diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/aot.factories b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/aot.factories index a1905a126f02..13207fe900de 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/aot.factories +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/aot.factories @@ -1,2 +1,2 @@ org.springframework.aot.hint.RuntimeHintsRegistrar=\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations.OpenTelemetryAnnotationsRuntimeHints +io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.annotations.OpenTelemetryAnnotationsRuntimeHints diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 576dd0fab37a..18b469908e99 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1,2 @@ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web.RestClientInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.web.RestClientInstrumentationAutoConfiguration +io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.webmvc.SpringWebMvc6InstrumentationAutoConfiguration diff --git a/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java similarity index 96% rename from instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java index 58237e0f8fd8..990ceb989028 100644 --- a/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/web/RestClientInstrumentationAutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.web; import static org.assertj.core.api.Assertions.assertThat; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java b/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java similarity index 95% rename from instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java rename to instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java index d84df1a203ef..b50d1af4729c 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java +++ b/instrumentation/spring/spring-boot-autoconfigure-3/src/test/java/io/opentelemetry/instrumentation/spring/autoconfigure/v3/internal/instrumentation/webmvc/SpringWebMvcInstrumentation6AutoConfigurationTest.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc; +package io.opentelemetry.instrumentation.spring.autoconfigure.v3.internal.instrumentation.webmvc; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assumptions.assumeTrue; diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/EnableOpenTelemetry.java b/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/EnableOpenTelemetry.java deleted file mode 100644 index e299776c2f69..000000000000 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/EnableOpenTelemetry.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.instrumentation.spring.autoconfigure; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; - -/** - * Convenient annotation to leverage Spring autoconfiguration for OpenTelemetry in non-Spring Boot - * projects. - */ -@Configuration -@ComponentScan(basePackages = "io.opentelemetry.instrumentation.spring.autoconfigure") -@Target(ElementType.TYPE) -@Retention(RetentionPolicy.RUNTIME) -public @interface EnableOpenTelemetry {} diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories b/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 9ad2f41464f5..000000000000 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,15 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations.InstrumentationAnnotationsAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.kafka.KafkaInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging.OpenTelemetryAppenderAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.jdbc.JdbcInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.micrometer.MicrometerBridgeAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.r2dbc.R2dbcInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web.SpringWebInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux.SpringWebfluxInstrumentationAutoConfiguration,\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc.SpringWebMvc5InstrumentationAutoConfiguration - -org.springframework.context.ApplicationListener=\ -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging.LogbackAppenderApplicationListener diff --git a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 4d7a3f31c3b4..000000000000 --- a/instrumentation/spring/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,11 +0,0 @@ -io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.annotations.InstrumentationAnnotationsAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.kafka.KafkaInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.logging.OpenTelemetryAppenderAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.jdbc.JdbcInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.micrometer.MicrometerBridgeAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.r2dbc.R2dbcInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.web.SpringWebInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webflux.SpringWebfluxInstrumentationAutoConfiguration -io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.webmvc.SpringWebMvc6InstrumentationAutoConfiguration diff --git a/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts b/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts index 83bc9b8f7c0b..24c00943c549 100644 --- a/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts +++ b/instrumentation/spring/starters/spring-boot-starter/build.gradle.kts @@ -10,7 +10,7 @@ val springBootVersion = "2.6.15" dependencies { compileOnly("org.springframework.boot:spring-boot-starter:$springBootVersion") compileOnly("org.springframework.boot:spring-boot-starter-aop:$springBootVersion") - api(project(":instrumentation:spring:spring-boot-autoconfigure")) + api(project(":instrumentation:spring:spring-boot-autoconfigure-2")) api(project(":instrumentation:spring:spring-boot-autoconfigure-3")) api(project(":instrumentation-annotations")) implementation(project(":instrumentation:resources:library")) diff --git a/instrumentation/spring/starters/zipkin-spring-boot-starter/README.md b/instrumentation/spring/starters/zipkin-spring-boot-starter/README.md index 3302d231331a..a91e52ea4d5a 100644 --- a/instrumentation/spring/starters/zipkin-spring-boot-starter/README.md +++ b/instrumentation/spring/starters/zipkin-spring-boot-starter/README.md @@ -1,7 +1,7 @@ # OpenTelemetry Zipkin Exporter Starter -The OpenTelemetry Exporter Starter for Java is a starter package that includes packages required to enable tracing using OpenTelemetry. It also provides the dependency and corresponding auto-configuration. Check out [opentelemetry-spring-boot-autoconfigure](../../spring-boot-autoconfigure/README.md#features) for the list of supported libraries and features. +The OpenTelemetry Exporter Starter for Java is a starter package that includes packages required to enable tracing using OpenTelemetry. It also provides the dependency and corresponding auto-configuration. Check out [opentelemetry-spring-boot-autoconfigure](../../spring-boot-autoconfigure-2/README.md#features) for the list of supported libraries and features. -OpenTelemetry Zipkin Exporter Starter is a starter package that includes the opentelemetry-api, opentelemetry-sdk, opentelemetry-extension-annotations, opentelemetry-logging-exporter, opentelemetry-spring-boot-autoconfigurations and spring framework starters required to setup distributed tracing. It also provides the [opentelemetry-exporters-zipkin](https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/zipkin) artifact and corresponding exporter auto-configuration. Check out [opentelemetry-spring-boot-autoconfigure](../../spring-boot-autoconfigure/README.md#features) for the list of supported libraries and features. +OpenTelemetry Zipkin Exporter Starter is a starter package that includes the opentelemetry-api, opentelemetry-sdk, opentelemetry-extension-annotations, opentelemetry-logging-exporter, opentelemetry-spring-boot-autoconfigurations and spring framework starters required to setup distributed tracing. It also provides the [opentelemetry-exporters-zipkin](https://github.com/open-telemetry/opentelemetry-java/tree/main/exporters/zipkin) artifact and corresponding exporter auto-configuration. Check out [opentelemetry-spring-boot-autoconfigure](../../spring-boot-autoconfigure-2/README.md#features) for the list of supported libraries and features. Documentation for the OpenTelemetry Zipkin Exporter Starter can be found [here](https://opentelemetry.io/docs/zero-code/java/spring-boot/#zipkin-starter). diff --git a/settings.gradle.kts b/settings.gradle.kts index 85b8498cffa1..7cbfdaa083fc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -550,7 +550,7 @@ include(":instrumentation:servlet:servlet-javax-common:javaagent") include(":instrumentation:spark-2.3:javaagent") include(":instrumentation:spring:spring-batch-3.0:javaagent") include(":instrumentation:spring:spring-boot-actuator-autoconfigure-2.0:javaagent") -include(":instrumentation:spring:spring-boot-autoconfigure") +include(":instrumentation:spring:spring-boot-autoconfigure-2") include(":instrumentation:spring:spring-boot-autoconfigure-3") include(":instrumentation:spring:spring-boot-resources:javaagent") include(":instrumentation:spring:spring-boot-resources:javaagent-unit-tests") diff --git a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmKafkaSpringStarterSmokeTest.java b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmKafkaSpringStarterSmokeTest.java index 8be2b86e9539..b99c537aee4c 100644 --- a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmKafkaSpringStarterSmokeTest.java +++ b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmKafkaSpringStarterSmokeTest.java @@ -6,8 +6,8 @@ package io.opentelemetry.spring.smoketest; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; -import io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.kafka.KafkaInstrumentationAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.kafka.KafkaInstrumentationAutoConfiguration; import java.time.Duration; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; diff --git a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmMongodbSpringStarterSmokeTest.java b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmMongodbSpringStarterSmokeTest.java index ac213a4b4669..3e667e4c9e3b 100644 --- a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmMongodbSpringStarterSmokeTest.java +++ b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractJvmMongodbSpringStarterSmokeTest.java @@ -7,8 +7,8 @@ import com.mongodb.client.MongoClient; import io.opentelemetry.api.OpenTelemetry; -import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration; -import io.opentelemetry.instrumentation.spring.autoconfigure.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.OpenTelemetryAutoConfiguration; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.instrumentation.mongo.MongoClientInstrumentationAutoConfiguration; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; diff --git a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractOtelSpringStarterSmokeTest.java b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractOtelSpringStarterSmokeTest.java index 4e802dd3bccb..773c00e2cf8d 100644 --- a/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractOtelSpringStarterSmokeTest.java +++ b/smoke-tests-otel-starter/spring-boot-common/src/main/java/io/opentelemetry/spring/smoketest/AbstractOtelSpringStarterSmokeTest.java @@ -12,10 +12,10 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanKind; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtelResourceProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.OtlpExporterProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.PropagationProperties; -import io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties.SpringConfigProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtelResourceProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.OtlpExporterProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.PropagationProperties; +import io.opentelemetry.instrumentation.spring.autoconfigure.v2.internal.properties.SpringConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider; import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties; diff --git a/smoke-tests-otel-starter/spring-smoke-testing/build.gradle.kts b/smoke-tests-otel-starter/spring-smoke-testing/build.gradle.kts index cc34ef0d91bb..a1ac6fc9a58e 100644 --- a/smoke-tests-otel-starter/spring-smoke-testing/build.gradle.kts +++ b/smoke-tests-otel-starter/spring-smoke-testing/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { compileOnly("org.springframework.boot:spring-boot-starter") compileOnly("org.springframework.boot:spring-boot-starter-test") api(project(":testing-common")) - api(project(":instrumentation:spring:spring-boot-autoconfigure")) + api(project(":instrumentation:spring:spring-boot-autoconfigure-2")) api("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi") }