Skip to content

Commit

Permalink
fix double instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Feb 18, 2025
1 parent d52a3b5 commit 1a90b20
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public class Java8RuntimeMetricsInstaller implements AgentListener {

@Override
public void afterAgent(AutoConfiguredOpenTelemetrySdk autoConfiguredSdk) {
if (Double.parseDouble(System.getProperty("java.specification.version")) >= 17) {
return;
}

RuntimeMetrics runtimeMetrics =
RuntimeMetricsConfigUtil.configure(
RuntimeMetrics.builder(GlobalOpenTelemetry.get()), AgentInstrumentationConfig.get());
Expand Down

0 comments on commit 1a90b20

Please sign in to comment.