From c97557543d46a13fcb574ee5e54f75b59336bcc3 Mon Sep 17 00:00:00 2001 From: Huy Vo Date: Thu, 12 Oct 2023 14:56:30 -0700 Subject: [PATCH] Fix java dependency updates --- .../src/main/java/com/amazon/sampleapp/AppController.java | 4 ++-- sample-apps/java-sample-app/manual/build.gradle.kts | 2 +- .../main/java/software/amazon/adot/sampleapp/ManualApp.java | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/centralized-sampling-tests/sample-apps/spring-boot/src/main/java/com/amazon/sampleapp/AppController.java b/centralized-sampling-tests/sample-apps/spring-boot/src/main/java/com/amazon/sampleapp/AppController.java index 6d8fbb68..e385cb3d 100644 --- a/centralized-sampling-tests/sample-apps/spring-boot/src/main/java/com/amazon/sampleapp/AppController.java +++ b/centralized-sampling-tests/sample-apps/spring-boot/src/main/java/com/amazon/sampleapp/AppController.java @@ -12,7 +12,7 @@ import io.opentelemetry.sdk.trace.SdkTracerProvider; import java.time.Duration; -import static io.opentelemetry.semconv.resource.attributes.ResourceAttributes.SERVICE_NAME; +import io.opentelemetry.semconv.ResourceAttributes; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -36,7 +36,7 @@ public class AppController { } Resource resource = Resource.builder() - .put(SERVICE_NAME, serviceName) + .put(ResourceAttributes.SERVICE_NAME, serviceName) .build(); OpenTelemetry openTelemetry = diff --git a/sample-apps/java-sample-app/manual/build.gradle.kts b/sample-apps/java-sample-app/manual/build.gradle.kts index 84f38608..7f4d4586 100644 --- a/sample-apps/java-sample-app/manual/build.gradle.kts +++ b/sample-apps/java-sample-app/manual/build.gradle.kts @@ -45,7 +45,7 @@ jib { dependencies { // OpenTelemetry APIs and SDKs - implementation(platform("io.opentelemetry:opentelemetry-bom:1.31.0")) + implementation(platform("io.opentelemetry:opentelemetry-bom:1.30.1")) implementation("io.opentelemetry:opentelemetry-api") implementation("io.opentelemetry:opentelemetry-sdk") diff --git a/sample-apps/java-sample-app/manual/src/main/java/software/amazon/adot/sampleapp/ManualApp.java b/sample-apps/java-sample-app/manual/src/main/java/software/amazon/adot/sampleapp/ManualApp.java index f4e6c3de..e9d7bf95 100644 --- a/sample-apps/java-sample-app/manual/src/main/java/software/amazon/adot/sampleapp/ManualApp.java +++ b/sample-apps/java-sample-app/manual/src/main/java/software/amazon/adot/sampleapp/ManualApp.java @@ -47,8 +47,6 @@ import software.amazon.awssdk.services.s3.S3Client; import spark.Response; -import java.util.List; - public class ManualApp extends BaseApp { private static final String REQUEST_OTEL_SCOPE = "requestOtelContext";