File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -344,23 +344,19 @@ compile time for it to work.
344344Use of ` VirtualField ` requires the ` muzzle-generation ` gradle plugin. Failing to use the plugin will result in
345345ClassNotFoundException when trying to access the field.
346346
347- ### Why we don't use ByteBuddy @Advice .Origin Method
347+ ### Avoid using @Advice .Origin Method
348348
349- Instead of
349+ You shouldn't use ByteBuddy's @Advice .Origin Method method, as it
350+ inserts a call to ` Class.getMethod(...) ` in a transformed method.
350351
351- ```
352- @Advice.Origin Method method
353- ```
352+ Instead, get the declaring class and method name, as loading
353+ constants from a constant pool is a much simpler operation.
354354
355- we prefer to use
355+ For example:
356356
357357```
358358@Advice.Origin("#t") Class<?> declaringClass,
359359@Advice.Origin("#m") String methodName
360360```
361361
362- because the former inserts a call to ` Class.getMethod(...) ` in transformed method. In contrast,
363- getting the declaring class and method name is just loading constants from constant pool, which is
364- a much simpler operation.
365-
366362[ suppress ] : https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#suppressing-specific-auto-instrumentation
You can’t perform that action at this time.
0 commit comments