Include advice class name in instrumentation exception handler log#11457
Conversation
|
|
Depends somehow on #11268 that will fix the exception that's excluded in system tests but now the text slightly changed :) |
mhlidd
left a comment
There was a problem hiding this comment.
Code looks good. Just some nit comments for clarity since I got confused following 😅
ad3ca32 to
f8fb4c1
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
15dc542
into
master
What Does This Do
Refactors
ExceptionHandlers.defaultExceptionHandlerinto a factory that takes the advice class FQN, and changes the bytecode it emits so the resulting log line is:instead of:
The existing
... for <instrumentedClass>prefix is preserved (so existing log searches / dashboards keep working);Please note that now the stack manipulation is compound and made of two part:
TextConstantthat's allocated for each Advice when they are installed (it's small and cheap, just doing aLDC)The new logging bytecode has been adapted to consume the advice name from the stack and weave it into the log message at runtime via two
String.concatcalls.This is very useful to understand which advice specifically triggered the error for the telemetry. Unfortunately there is no easy way to make distinction between the
OnMethodEnter/OnMethodExitbut this is a nice step forward in improving the message.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 issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-levelJira ticket: [PROJ-IDENT]