Commit 94ef8fb
committed
fix: prevent Shadow 9 from relocating logback descriptor in ClassicSdk appender suppression
The upgrade from Shadow 8 to Shadow 9 (via gradle-plugins 2.26.1-alpha)
changed constant pool string scanning to be more aggressive. Shadow 9 now
rewrites all UTF-8 string constants containing relocatable package names,
not just class/type references. This caused the literal
"(Lch/qos/logback/classic/spi/ILoggingEvent;)V" inside
ApplicationInsightsAppenderClassVisitor to be relocated to a shadowed
package path, so the descriptor check in visitMethod() never matched the
actual user class. This left the Classic SDK logback appender running
unsuppressed, producing duplicate MessageData (SourceType "LOGBack"
alongside "Logger").
Replace the exact descriptor equality checks with a generic signature
pattern match on the append method. This is safe because transform()
already gates on the exact appender class name via UnshadedSdkPackageName.1 parent 8e7fcd9 commit 94ef8fb
1 file changed
Lines changed: 5 additions & 3 deletions
File tree
- agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/classicsdk
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
0 commit comments