diff --git a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AiConfigCustomizer.java b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AiConfigCustomizer.java index df789a7b482..e1efbce07c0 100644 --- a/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AiConfigCustomizer.java +++ b/agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/init/AiConfigCustomizer.java @@ -25,7 +25,7 @@ public Map apply(ConfigProperties otelConfig) { "applicationinsights.internal.micrometer.step.millis", Long.toString(SECONDS.toMillis(configuration.metricIntervalSeconds))); - enableInstrumentations(configuration, properties); + enableInstrumentations(otelConfig, configuration, properties); if (!configuration.preview.captureControllerSpans) { properties.put( @@ -116,7 +116,8 @@ public Map apply(ConfigProperties otelConfig) { return properties; } - private static void enableInstrumentations(Configuration config, Map properties) { + private static void enableInstrumentations( + ConfigProperties otelConfig, Configuration config, Map properties) { properties.put("otel.instrumentation.common.default-enabled", "false"); properties.put("otel.instrumentation.experimental.span-suppression-strategy", "client"); @@ -148,7 +149,9 @@ private static void enableInstrumentations(Configuration config, Map