Skip to content

Commit

Permalink
HPCC4J-647 FileUtility only use otel autosdk without javaagent
Browse files Browse the repository at this point in the history
- Added a check to only initialize the OTel autosdk if an OTel javaagent hasn't been set

Signed-off-by: James McMullan [email protected]
  • Loading branch information
jpmcmu committed Sep 17, 2024
1 parent 735de52 commit ff0418d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff0418d

Please sign in to comment.