Guard against null logback events#11960
Conversation
There was a problem hiding this comment.
More details
PR adds null-safety guards to two logback instrumentation advice methods. CallAppendersAdvice2 directly calls methods on the event without null checks (getThreadName, getLevel, etc.), so a null event would cause a NullPointerException. CallAppendersAdvice passes the event as a key to WeakMap, which doesn't support null keys. Both guards are defensive and necessary, with no behavioral side effects.
🤖 Datadog Autotest · Commit f37d1cd · What is Autotest? · Any feedback? Reach out in #autotest
|
🎯 Code Coverage (details) 🔗 Commit SHA: f37d1cd | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
mcculls
left a comment
There was a problem hiding this comment.
Seems reasonable, although I too would like to know where the null events came from
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Build pipeline has failing jobs for da28fd1: What to do next?
DetailsSince those jobs are not marked as being allowed to fail, the pipeline will most likely fail. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
dfc80be
into
master
What Does This Do
Even I did not found a codepath on logback source that calls
callAppenderswith a null event, we surface this situation:It can also be a third party. In any case our store is not supporting null keys hence adding this guard for code hygiene.
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]