diff --git a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml
index 909cdd6c5f7e2..ef94452e46463 100644
--- a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml
+++ b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/pom.xml
@@ -180,12 +180,6 @@
2.9.3
test
-
- com.squareup.okio
- okio
- 3.9.1
- test
-
diff --git a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/module-info.java b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/module-info.java
new file mode 100644
index 0000000000000..4d249d2d398fa
--- /dev/null
+++ b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/main/java/module-info.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+module com.azure.monitor.opentelemetry.autoconfigure {
+
+ requires transitive com.azure.core;
+
+ requires java.management;
+
+ requires io.netty.handler;
+
+ requires io.opentelemetry.api;
+ requires io.opentelemetry.context;
+ requires io.opentelemetry.sdk.autoconfigure.spi;
+ requires io.opentelemetry.sdk.common;
+ requires io.opentelemetry.sdk.logs;
+ requires io.opentelemetry.sdk.metrics;
+ requires io.opentelemetry.sdk.trace;
+ requires io.opentelemetry.semconv;
+ requires io.opentelemetry.semconv.incubating;
+
+ opens com.azure.monitor.opentelemetry.autoconfigure.implementation.models to com.azure.core;
+ opens com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models to com.azure.core;
+
+ provides io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider
+ with com.azure.monitor.opentelemetry.autoconfigure.implementation.AzureMonitorLogRecordExporterProvider;
+ provides io.opentelemetry.sdk.autoconfigure.spi.metrics.ConfigurableMetricExporterProvider
+ with com.azure.monitor.opentelemetry.autoconfigure.implementation.AzureMonitorMetricExporterProvider;
+ provides io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider
+ with com.azure.monitor.opentelemetry.autoconfigure.implementation.AzureMonitorSpanExporterProvider;
+
+ exports com.azure.monitor.opentelemetry.autoconfigure;
+
+}
diff --git a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/test/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/statsbeat/AzureMetadataServiceTest.java b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/test/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/statsbeat/AzureMetadataServiceTest.java
index b9fef4cc6cc57..96bc7bbcc30bc 100644
--- a/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/test/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/statsbeat/AzureMetadataServiceTest.java
+++ b/sdk/monitor/azure-monitor-opentelemetry-autoconfigure/src/test/java/com/azure/monitor/opentelemetry/autoconfigure/implementation/statsbeat/AzureMetadataServiceTest.java
@@ -3,13 +3,11 @@
package com.azure.monitor.opentelemetry.autoconfigure.implementation.statsbeat;
-import okio.BufferedSource;
-import okio.Okio;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -21,10 +19,8 @@ public class AzureMetadataServiceTest {
public void testParseJsonResponseLinux() throws IOException {
Path path
= new File(getClass().getClassLoader().getResource("metadata_instance_linux.json").getPath()).toPath();
- InputStream in = Files.newInputStream(path);
- BufferedSource source = Okio.buffer(Okio.source(in));
- String result = source.readUtf8();
- source.close();
+ byte[] fileContent = Files.readAllBytes(path);
+ String result = new String(fileContent, StandardCharsets.UTF_8);
AttachStatsbeat attachStatsbeat = new AttachStatsbeat(new CustomDimensions());
AzureMetadataService azureMetadataService
@@ -43,10 +39,8 @@ public void testParseJsonResponseLinux() throws IOException {
public void testParseJsonResponseWindows() throws IOException {
Path path
= new File(getClass().getClassLoader().getResource("metadata_instance_windows.json").getPath()).toPath();
- InputStream in = Files.newInputStream(path);
- BufferedSource source = Okio.buffer(Okio.source(in));
- String result = source.readUtf8();
- source.close();
+ byte[] fileContent = Files.readAllBytes(path);
+ String result = new String(fileContent, StandardCharsets.UTF_8);
AttachStatsbeat attachStatsbeat = new AttachStatsbeat(new CustomDimensions());
AzureMetadataService azureMetadataService