Skip to content

Commit 73e69db

Browse files
authored
Exclude yourkit classes (#304)
Signed-off-by: Pavol Loffay <[email protected]>
1 parent dcc2058 commit 73e69db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

otel-extensions/src/main/java/org/hypertrace/agent/otel/extensions/HypertraceGlobalIgnoreMatcher.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public class HypertraceGlobalIgnoreMatcher implements IgnoreMatcherProvider {
2525
@Override
2626
public Result type(net.bytebuddy.description.type.TypeDescription target) {
2727
String actualName = target.getActualName();
28+
29+
if (actualName.startsWith("com.yourkit")) {
30+
return Result.IGNORE;
31+
}
32+
2833
if (actualName.startsWith("java.io")) {
2934
if (actualName.equals("java.io.InputStream")
3035
|| actualName.equals("java.io.OutputStream")
@@ -47,7 +52,7 @@ public Result classloader(ClassLoader classLoader) {
4752
}
4853

4954
String name = classLoader.getClass().getName();
50-
if (name.startsWith("com.singularity.")) {
55+
if (name.startsWith("com.singularity.") || name.startsWith("com.yourkit.")) {
5156
return Result.IGNORE;
5257
}
5358
return Result.DEFAULT;

0 commit comments

Comments
 (0)