Skip to content

Commit cc36e4c

Browse files
authored
Optimize Lambda proxy class matching on filtering (#10905)
Optimize Lambda proxy class matching on filtering When trying to match classes to exclude third-party ones we are excluding also lambda proxy classes that are shown with JVM option -XX:+ShowHiddenFrames RegEx are used to identify them correctly but this is expensive. we are using a fast path by searching for 'Lambda' first before applying RegEx matching. Co-authored-by: jean-philippe.bempel <jean-philippe.bempel@datadoghq.com>
1 parent f1fcf26 commit cc36e4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/util/ClassNameFiltering.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public boolean isExcluded(String className) {
5050
}
5151

5252
static boolean isLambdaProxyClass(String className) {
53-
return LAMBDA_PROXY_CLASS_PATTERN.matcher(className).matches();
53+
return className.contains("Lambda") && LAMBDA_PROXY_CLASS_PATTERN.matcher(className).matches();
5454
}
5555

5656
int shadedIndexOf(String className) {

0 commit comments

Comments
 (0)