diff --git a/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleInstrumentation.java b/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleInstrumentation.java index fb664477e2f..c991dcea65b 100644 --- a/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleInstrumentation.java +++ b/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleInstrumentation.java @@ -1,7 +1,7 @@ package datadog.trace.instrumentation.jbossmodules; import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.named; -import static datadog.trace.instrumentation.jbossmodules.ModuleNameHelper.STRIPPER; +import static datadog.trace.instrumentation.jbossmodules.ModuleNameHelper.NAME_EXTRACTOR; import static net.bytebuddy.matcher.ElementMatchers.isConstructor; import static net.bytebuddy.matcher.ElementMatchers.isMethod; import static net.bytebuddy.matcher.ElementMatchers.takesArgument; @@ -163,7 +163,7 @@ public static void onExit( public static class CaptureModuleNameAdvice { @Advice.OnMethodExit(suppress = Throwable.class) public static void afterConstruct(@Advice.This final Module module) { - ClassloaderServiceNames.addIfMissing(module.getClassLoader(), STRIPPER); + ClassloaderServiceNames.addIfMissing(module.getClassLoader(), NAME_EXTRACTOR); } } } diff --git a/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleNameHelper.java b/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleNameHelper.java index 840630fc4ed..f2bb6751c18 100644 --- a/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleNameHelper.java +++ b/dd-java-agent/instrumentation/jboss-modules/src/main/java/datadog/trace/instrumentation/jbossmodules/ModuleNameHelper.java @@ -11,7 +11,7 @@ private ModuleNameHelper() {} private static final Pattern SUBDEPLOYMENT_MATCH = Pattern.compile("deployment(?>.+\\.ear)?\\.(.+)\\.[j|w]ar"); - public static final Function> STRIPPER = + public static final Function> NAME_EXTRACTOR = classLoader -> { final Matcher matcher = SUBDEPLOYMENT_MATCH.matcher(