Add missing throwable suppression on instrumentation advice - #12019
Conversation
There was a problem hiding this comment.
More details
This PR adds suppress = Throwable.class to ByteBuddy Advice methods across 9 concurrent instrumentation files. The change follows the correct pattern: @Advice.OnMethodEnter(suppress = Throwable.class) and @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) prevent exceptions from advice code from bubbling up to application code, which is safe and required per instrumentation development conventions. The changes are mechanically sound—all scope/state management operations (startTaskScope, endTaskScope, cancelTask) are defensive and will not corrupt application state if they encounter errors.
🤖 Datadog Autotest · Commit 3c94afd · What is Autotest? · Any feedback? Reach out in #autotest
This comment has been minimized.
This comment has been minimized.
🟢 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. |
AlexeyKuznetsov-DD
left a comment
There was a problem hiding this comment.
LGTM.
I found one super minor issue that can be improved in follow up PR:
we have ~320 lines of:
@Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class)
and ~150 lines of:
@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)
I think it make sense to have only 1 variant (mechanical find-and-replace) to simplify future search in code base.
|
I'll do the fix but that's a way bigger change 😅 |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
This PR fixes compilation warnings about missing throwable suppression from advices.
Motivation
Apply advice development conventions and prevent exceptions from bubbling up to application code.
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]