I would like to do the following:
@Advice.OnMethodExit(suppress = Throwable.class, inline = true) public static void onExit( @Advice.Enter @Nullable Object abstractSpanObj, @Advice.This Object thiz, @Advice.FieldValue(value = "localState", readOnly = false) Map<IOLocal<?>, Object> localState )
As far as I understand, you can only set
readOnly = false on a private field of a class when the
Advice is inlined. The problem is that it cannot be inlined due to the IndyBootstrap.
How can we change private fields of classes with this approach? Or is this a limitation of the ElasticAPM intrumentation?
It seems to be related to: Customizable advice dispatcher · Issue #830 · raphw/byte-buddy · GitHub