10000 Service naming: split by jee deployment by amarziali · Pull Request #8064 · DataDog/dd-trace-java · GitHub
[go: up one dir, main page]

Skip to content

Service naming: split by jee deployment #8064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 12, 2024
Prev Previous commit
Next Next commit
renaming
  • Loading branch information
amarziali committed Dec 12, 2024
commit 4b43be2a72f3cb6bd2a9b6c71f550dbcc38b88b7
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ private ModuleNameHelper() {}

private static final Pattern SUBDEPLOYMENT_MATCH =
Pattern.compile("deployment(?>.+\\.ear)?\\.(.+)\\.[j|w]ar");
public static final Function<ClassLoader, Supplier<String>> STRIPPER =
public static final Function<ClassLoader, Supplier<String>> NAME_EXTRACTOR =
classLoader -> {
final Matcher matcher =
SUBDEPLOYMENT_MATCH.matcher(
Expand Down
0