Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Dec 17, 2024
1 parent 3a556dc commit 9ea2938
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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();
}
Expand Down

0 comments on commit 9ea2938

Please sign in to comment.