From a55c7e495a9d270e78a255d7c0018ab6df726e6f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 20 Dec 2021 18:00:00 -0800 Subject: [PATCH] Rename log4j-thread-context modules to log4j-context-data --- .../log4j-context-data-2-common}/testing/build.gradle.kts | 0 .../testing/src/main/groovy/Log4j2Test.groovy | 0 .../instrumentation/log4j/v2_16/ListAppender.java | 0 .../testing/src/main/resources/log4j2-test.xml | 0 .../log4j-context-data-2.16}/javaagent/build.gradle.kts | 6 +++--- .../log4j/v2_16/Log4j2InstrumentationModule.java | 2 +- .../javaagent/src/test/groovy/AutoLog4j2Test.groovy | 0 .../library-autoconfigure/README.md | 0 .../library-autoconfigure/build.gradle.kts | 2 +- .../log4j/v2_16/OpenTelemetryContextDataProvider.java | 0 ...org.apache.logging.log4j.core.util.ContextDataProvider | 0 .../src/test/groovy/LibraryLog4j2Test.groovy | 0 .../log4j-context-data-2.7}/javaagent/build.gradle.kts | 4 ++-- .../v2_7/ContextDataInjectorFactoryInstrumentation.java | 0 .../log4j/v2_7/Log4j27InstrumentationModule.java | 2 +- .../log4j/v2_7/SpanDecoratingContextDataInjector.java | 0 .../javaagent/src/test/groovy/Log4j27Test.groovy | 0 settings.gradle.kts | 8 ++++---- 18 files changed, 12 insertions(+), 12 deletions(-) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2-common => log4j-context-data/log4j-context-data-2-common}/testing/build.gradle.kts (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2-common => log4j-context-data/log4j-context-data-2-common}/testing/src/main/groovy/Log4j2Test.groovy (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2-common => log4j-context-data/log4j-context-data-2-common}/testing/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/ListAppender.java (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2-common => log4j-context-data/log4j-context-data-2-common}/testing/src/main/resources/log4j2-test.xml (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/javaagent/build.gradle.kts (75%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java (97%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/javaagent/src/test/groovy/AutoLog4j2Test.groovy (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/library-autoconfigure/README.md (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/library-autoconfigure/build.gradle.kts (62%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryContextDataProvider.java (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/library-autoconfigure/src/main/resources/META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.16 => log4j-context-data/log4j-context-data-2.16}/library-autoconfigure/src/test/groovy/LibraryLog4j2Test.groovy (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.7 => log4j-context-data/log4j-context-data-2.7}/javaagent/build.gradle.kts (60%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.7 => log4j-context-data/log4j-context-data-2.7}/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/ContextDataInjectorFactoryInstrumentation.java (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.7 => log4j-context-data/log4j-context-data-2.7}/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java (96%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.7 => log4j-context-data/log4j-context-data-2.7}/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/SpanDecoratingContextDataInjector.java (100%) rename instrumentation/log4j/{log4j-thread-context/log4j-thread-context-2.7 => log4j-context-data/log4j-context-data-2.7}/javaagent/src/test/groovy/Log4j27Test.groovy (100%) diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/build.gradle.kts b/instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/build.gradle.kts similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/build.gradle.kts rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/build.gradle.kts diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/groovy/Log4j2Test.groovy b/instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/groovy/Log4j2Test.groovy similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/groovy/Log4j2Test.groovy rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/groovy/Log4j2Test.groovy diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/ListAppender.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/ListAppender.java similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/ListAppender.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/ListAppender.java diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/resources/log4j2-test.xml b/instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/resources/log4j2-test.xml similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2-common/testing/src/main/resources/log4j2-test.xml rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2-common/testing/src/main/resources/log4j2-test.xml diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/build.gradle.kts b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/build.gradle.kts similarity index 75% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/build.gradle.kts rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/build.gradle.kts index 909dc56740eb..b19a169e3d89 100644 --- a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/build.gradle.kts +++ b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/build.gradle.kts @@ -23,11 +23,11 @@ testSets { dependencies { library("org.apache.logging.log4j:log4j-core:2.16.0") - implementation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.16:library-autoconfigure")) + implementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.16:library-autoconfigure")) - testInstrumentation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.7:javaagent")) + testInstrumentation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.7:javaagent")) - testImplementation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2-common:testing")) + testImplementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2-common:testing")) } tasks { diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java similarity index 97% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java index 722533d09b31..87668278b317 100644 --- a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java +++ b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_16/Log4j2InstrumentationModule.java @@ -22,7 +22,7 @@ @AutoService(InstrumentationModule.class) public class Log4j2InstrumentationModule extends InstrumentationModule { public Log4j2InstrumentationModule() { - super("log4j-thread-context", "log4j-thread-context-2.16"); + super("log4j-context-data", "log4j-context-data-2.16"); } @Override diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/src/test/groovy/AutoLog4j2Test.groovy b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/src/test/groovy/AutoLog4j2Test.groovy similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/javaagent/src/test/groovy/AutoLog4j2Test.groovy rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/javaagent/src/test/groovy/AutoLog4j2Test.groovy diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/README.md b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/README.md similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/README.md rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/README.md diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/build.gradle.kts b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/build.gradle.kts similarity index 62% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/build.gradle.kts rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/build.gradle.kts index 3e47d44f5ef6..14c4d240072f 100644 --- a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/build.gradle.kts +++ b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/build.gradle.kts @@ -7,5 +7,5 @@ base.archivesName.set("${base.archivesName.get()}-autoconfigure") dependencies { library("org.apache.logging.log4j:log4j-core:2.16.0") - testImplementation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2-common:testing")) + testImplementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2-common:testing")) } diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryContextDataProvider.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryContextDataProvider.java similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryContextDataProvider.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/log4j/v2_16/OpenTelemetryContextDataProvider.java diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/main/resources/META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/main/resources/META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/main/resources/META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/main/resources/META-INF/services/org.apache.logging.log4j.core.util.ContextDataProvider diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/test/groovy/LibraryLog4j2Test.groovy b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/test/groovy/LibraryLog4j2Test.groovy similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.16/library-autoconfigure/src/test/groovy/LibraryLog4j2Test.groovy rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.16/library-autoconfigure/src/test/groovy/LibraryLog4j2Test.groovy diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/build.gradle.kts b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/build.gradle.kts similarity index 60% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/build.gradle.kts rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/build.gradle.kts index 6dc937a5ad38..1067a4aa6d42 100644 --- a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/build.gradle.kts +++ b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/build.gradle.kts @@ -14,9 +14,9 @@ muzzle { dependencies { library("org.apache.logging.log4j:log4j-core:2.7") - testInstrumentation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.16:javaagent")) + testInstrumentation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.16:javaagent")) - testImplementation(project(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2-common:testing")) + testImplementation(project(":instrumentation:log4j:log4j-context-data:log4j-context-data-2-common:testing")) latestDepTestLibrary("org.apache.logging.log4j:log4j-core:2.15.0") } diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/ContextDataInjectorFactoryInstrumentation.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/ContextDataInjectorFactoryInstrumentation.java similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/ContextDataInjectorFactoryInstrumentation.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/ContextDataInjectorFactoryInstrumentation.java diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java similarity index 96% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java index efdcb3bb5e28..a2b5ce6702ff 100644 --- a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java +++ b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/Log4j27InstrumentationModule.java @@ -18,7 +18,7 @@ @AutoService(InstrumentationModule.class) public class Log4j27InstrumentationModule extends InstrumentationModule { public Log4j27InstrumentationModule() { - super("log4j-thread-context", "log4j-thread-context-2.7"); + super("log4j-context-data", "log4j-context-data-2.7"); } @Override diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/SpanDecoratingContextDataInjector.java b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/SpanDecoratingContextDataInjector.java similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/SpanDecoratingContextDataInjector.java rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/log4j/v2_7/SpanDecoratingContextDataInjector.java diff --git a/instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/test/groovy/Log4j27Test.groovy b/instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/test/groovy/Log4j27Test.groovy similarity index 100% rename from instrumentation/log4j/log4j-thread-context/log4j-thread-context-2.7/javaagent/src/test/groovy/Log4j27Test.groovy rename to instrumentation/log4j/log4j-context-data/log4j-context-data-2.7/javaagent/src/test/groovy/Log4j27Test.groovy diff --git a/settings.gradle.kts b/settings.gradle.kts index 476e0d21e424..4942d050cfc8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -269,10 +269,10 @@ include(":instrumentation:liberty:liberty:javaagent") include(":instrumentation:liberty:liberty-dispatcher:javaagent") include(":instrumentation:log4j:log4j-appender-1.2:javaagent") include(":instrumentation:log4j:log4j-mdc-1.2:javaagent") -include(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.7:javaagent") -include(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.16:javaagent") -include(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2.16:library-autoconfigure") -include(":instrumentation:log4j:log4j-thread-context:log4j-thread-context-2-common:testing") +include(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.7:javaagent") +include(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.16:javaagent") +include(":instrumentation:log4j:log4j-context-data:log4j-context-data-2.16:library-autoconfigure") +include(":instrumentation:log4j:log4j-context-data:log4j-context-data-2-common:testing") include(":instrumentation:log4j:log4j-appender-2.16:javaagent") include(":instrumentation:log4j:log4j-appender-2.16:library") include(":instrumentation:logback:logback-appender-1.0:javaagent")