From 3a556dc8348087551a69fa2ea86a405577a751f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 04:25:30 +0000 Subject: [PATCH 1/3] fix(deps): update dependency com.google.guava:guava-bom to v33.4.0-jre --- dependencyManagement/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencyManagement/build.gradle.kts b/dependencyManagement/build.gradle.kts index 4c9738b7d..8faa1e795 100644 --- a/dependencyManagement/build.gradle.kts +++ b/dependencyManagement/build.gradle.kts @@ -11,7 +11,7 @@ val otelInstrumentationVersion = "2.10.0-alpha" val DEPENDENCY_BOMS = listOf( "com.fasterxml.jackson:jackson-bom:2.18.2", - "com.google.guava:guava-bom:33.3.1-jre", + "com.google.guava:guava-bom:33.4.0-jre", "com.linecorp.armeria:armeria-bom:1.31.3", "org.junit:junit-bom:5.11.4", "io.grpc:grpc-bom:1.69.0", From 9ea293894d83201968298d5eb6819223dbe29349 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 17 Dec 2024 14:03:23 -0800 Subject: [PATCH 2/3] Fix deprecation warning --- .../contrib/aws/resource/BeanstalkResourceTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java index d8fc03935..c70642890 100644 --- a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java +++ b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/BeanstalkResourceTest.java @@ -11,9 +11,9 @@ import static io.opentelemetry.semconv.incubating.CloudIncubatingAttributes.CLOUD_PROVIDER; import static io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes.SERVICE_INSTANCE_ID; import static io.opentelemetry.semconv.incubating.ServiceIncubatingAttributes.SERVICE_NAMESPACE; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.entry; -import com.google.common.base.Charsets; import com.google.common.io.Files; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider; @@ -33,7 +33,7 @@ void testCreateAttributes(@TempDir File tempFolder) throws IOException { String content = "{\"noise\": \"noise\", \"deployment_id\":4,\"" + "version_label\":\"2\",\"environment_name\":\"HttpSubscriber-env\"}"; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); Resource resource = BeanstalkResource.buildResource(file.getPath()); Attributes attributes = resource.getAttributes(); assertThat(attributes) @@ -59,7 +59,7 @@ void testBadConfigFile(@TempDir File tempFolder) throws IOException { String content = "\"deployment_id\":4,\"version_label\":\"2\",\"" + "environment_name\":\"HttpSubscriber-env\"}"; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); Attributes attributes = BeanstalkResource.buildResource(file.getPath()).getAttributes(); assertThat(attributes).isEmpty(); } From ef58268ab9259c050fe5e54ad7c7bd155606ab67 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 17 Dec 2024 14:03:59 -0800 Subject: [PATCH 3/3] Fix deprecation warning --- .../contrib/aws/resource/DockerHelperTest.java | 6 +++--- .../opentelemetry/contrib/aws/resource/EksResourceTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/DockerHelperTest.java b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/DockerHelperTest.java index 9d7ef46bb..409ab4b85 100644 --- a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/DockerHelperTest.java +++ b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/DockerHelperTest.java @@ -5,9 +5,9 @@ package io.opentelemetry.contrib.aws.resource; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; -import com.google.common.base.Charsets; import com.google.common.io.Files; import java.io.File; import java.io.IOException; @@ -26,7 +26,7 @@ void testCgroupFileMissing() { void testContainerIdMissing(@TempDir File tempFolder) throws IOException { File file = new File(tempFolder, "no_container_id"); String content = "13:pids:/\n" + "12:hugetlb:/\n" + "11:net_prio:/"; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); DockerHelper dockerHelper = new DockerHelper(file.getPath()); assertThat(dockerHelper.getContainerId()).isEmpty(); @@ -37,7 +37,7 @@ void testGetContainerId(@TempDir File tempFolder) throws IOException { File file = new File(tempFolder, "cgroup"); String expected = "386a1920640799b5bf5a39bd94e489e5159a88677d96ca822ce7c433ff350163"; String content = "dummy\n11:devices:/ecs/bbc36dd0-5ee0-4007-ba96-c590e0b278d2/" + expected; - Files.write(content.getBytes(Charsets.UTF_8), file); + Files.write(content.getBytes(UTF_8), file); DockerHelper dockerHelper = new DockerHelper(file.getPath()); assertThat(dockerHelper.getContainerId()).isEqualTo(expected); diff --git a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/EksResourceTest.java b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/EksResourceTest.java index b25bb70f4..7eaec5e55 100644 --- a/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/EksResourceTest.java +++ b/aws-resources/src/test/java/io/opentelemetry/contrib/aws/resource/EksResourceTest.java @@ -13,11 +13,11 @@ import static io.opentelemetry.semconv.incubating.CloudIncubatingAttributes.CLOUD_PROVIDER; import static io.opentelemetry.semconv.incubating.ContainerIncubatingAttributes.CONTAINER_ID; import static io.opentelemetry.semconv.incubating.K8sIncubatingAttributes.K8S_CLUSTER_NAME; +import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.entry; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; -import com.google.common.base.Charsets; import com.google.common.io.Files; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider; @@ -44,10 +44,10 @@ public class EksResourceTest { void testEks(@TempDir File tempFolder) throws IOException { File mockK8sTokenFile = new File(tempFolder, "k8sToken"); String token = "token123"; - Files.write(token.getBytes(Charsets.UTF_8), mockK8sTokenFile); + Files.write(token.getBytes(UTF_8), mockK8sTokenFile); File mockK8sKeystoreFile = new File(tempFolder, "k8sCert"); String truststore = "truststore123"; - Files.write(truststore.getBytes(Charsets.UTF_8), mockK8sKeystoreFile); + Files.write(truststore.getBytes(UTF_8), mockK8sKeystoreFile); when(httpClient.fetchString(any(), Mockito.eq(K8S_SVC_URL + AUTH_CONFIGMAP_PATH), any(), any())) .thenReturn("not empty");