Skip to content

Commit 6d26620

Browse files
committed
Fix muzzle validation for log4j-2.0 ThreadContextInstrumentation
1 parent d4fb234 commit 6d26620

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dd-java-agent/instrumentation/log4j/log4j-2.0/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ muzzle {
2626
versions = '[,3.0.0)'
2727
}
2828

29+
pass {
30+
name = 'thread-context'
31+
group = 'org.apache.logging.log4j'
32+
module = 'log4j-core'
33+
versions = '[,2.7)'
34+
}
35+
2936
pass {
3037
group = 'org.apache.logging.log4j'
3138
module = 'log4j-api'

dd-java-agent/instrumentation/log4j/log4j-2.0/src/main/java/datadog/trace/instrumentation/log4j2/ThreadContextInstrumentation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public String[] helperClassNames() {
4545
};
4646
}
4747

48+
@Override
49+
public String muzzleDirective() {
50+
return "thread-context";
51+
}
52+
4853
public static class ThreadContextAdvice {
4954
@Advice.OnMethodExit(suppress = Throwable.class)
5055
public static void mdcClassInitialized() {

0 commit comments

Comments
 (0)