diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java index e522b1e50..01cfe91b1 100644 --- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java +++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/FileUtility.java @@ -2140,7 +2140,10 @@ public static JSONArray run(String[] args) System.out.println(" otel.metrics.exporter: "+ System.getProperty("otel.metrics.exporter")); System.out.println(" OTEL_METRICS_EXPORTER Env var: " + System.getenv("OTEL_METRICS_EXPORTER")); - OpenTelemetry otel = AutoConfiguredOpenTelemetrySdk.initialize().getOpenTelemetrySdk(); + if (!org.hpccsystems.ws.client.utils.Utils.isOtelJavaagentUsed()) + { + AutoConfiguredOpenTelemetrySdk.initialize().getOpenTelemetrySdk(); + } } otelInitialized = true;