From 511d12afb7e26b0b711f58a826ca53f19da683bd Mon Sep 17 00:00:00 2001 From: freshchen <961011595@qq.com> Date: Fri, 29 Nov 2024 23:15:15 +0800 Subject: [PATCH] Add Apolloconfig Inst https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/12787 --- .../javaagent/build.gradle.kts | 13 +++---------- .../v1_0/ApolloRepositoryChangeTest.java | 4 ---- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/instrumentation/apolloconfig-apolloclient-1.0/javaagent/build.gradle.kts b/instrumentation/apolloconfig-apolloclient-1.0/javaagent/build.gradle.kts index 3e9c521fd3c9..69a6fb507a12 100644 --- a/instrumentation/apolloconfig-apolloclient-1.0/javaagent/build.gradle.kts +++ b/instrumentation/apolloconfig-apolloclient-1.0/javaagent/build.gradle.kts @@ -6,7 +6,7 @@ muzzle { pass { group.set("com.ctrip.framework.apollo") module.set("apollo-client") - versions.set("[1.0.0,2.3.0]") + versions.set("[1.0.0,)") assertInverse.set(true) } } @@ -15,15 +15,8 @@ dependencies { compileOnly("com.google.auto.value:auto-value-annotations") annotationProcessor("com.google.auto.value:auto-value") - library("com.ctrip.framework.apollo:apollo-client:1.1.0") + library("com.ctrip.framework.apollo:apollo-client:1.0.0") + testCompileOnly("com.ctrip.framework.apollo:apollo-client:1.1.0") testImplementation(project(":testing-common")) - - latestDepTestLibrary("com.ctrip.framework.apollo:apollo-client:1.1.+") -} - -tasks.withType().configureEach { - // required on jdk17 - jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED") - jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") } diff --git a/instrumentation/apolloconfig-apolloclient-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/apolloconfig/apolloclient/v1_0/ApolloRepositoryChangeTest.java b/instrumentation/apolloconfig-apolloclient-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/apolloconfig/apolloclient/v1_0/ApolloRepositoryChangeTest.java index 2e6b612645cb..e0cd954c8963 100644 --- a/instrumentation/apolloconfig-apolloclient-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/apolloconfig/apolloclient/v1_0/ApolloRepositoryChangeTest.java +++ b/instrumentation/apolloconfig-apolloclient-1.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/apolloconfig/apolloclient/v1_0/ApolloRepositoryChangeTest.java @@ -33,10 +33,6 @@ void fireRepositoryChangeTest() { testConfigRepository.addChangeListener(new TestRepositoryChangeListener()); testConfigRepository.sync(); - checkRepositoryChange(namespace); - } - - private static void checkRepositoryChange(String namespace) { testing.waitAndAssertTraces( trace -> trace.hasSpansSatisfyingExactly(