Yelijah commented on issue #10001:
URL: https://github.com/apache/skywalking/issues/10001#issuecomment-1324959411
> I am not sure actually. Plugins are contributed by many people. I don't
know all the details. I could only say, we don't instrument any Bootstrap Class
in the agent core.
I know what's wrong, `SkyWalkingAgent` set ignore for `AgentBuilder`, this
will override bytebuddy's default ignore which ignore all classes loaded by
BootstrapClassLoader.
So i have to add one more ignore for all classes loaded by
BootstrapClassLoader
```java
public Default(ByteBuddy byteBuddy) {
this(byteBuddy,
Listener.NoOp.INSTANCE,
DEFAULT_LOCK,
PoolStrategy.Default.FAST,
TypeStrategy.Default.REBASE,
LocationStrategy.ForClassLoader.STRONG,
NativeMethodStrategy.Disabled.INSTANCE,
WarmupStrategy.NoOp.INSTANCE,
TransformerDecorator.NoOp.INSTANCE,
new InitializationStrategy.SelfInjection.Split(),
RedefinitionStrategy.DISABLED,
RedefinitionStrategy.DiscoveryStrategy.SinglePass.INSTANCE,
RedefinitionStrategy.BatchAllocator.ForTotal.INSTANCE,
RedefinitionStrategy.Listener.NoOp.INSTANCE,
RedefinitionStrategy.ResubmissionStrategy.Disabled.INSTANCE,
InjectionStrategy.UsingReflection.INSTANCE,
LambdaInstrumentationStrategy.DISABLED,
DescriptionStrategy.Default.HYBRID,
FallbackStrategy.ByThrowableType.ofOptionalTypes(),
ClassFileBufferStrategy.Default.RETAINING,
InstallationListener.NoOp.INSTANCE,
new RawMatcher.Disjunction(
new RawMatcher.ForElementMatchers(any(),
isBootstrapClassLoader().or(isExtensionClassLoader())),
new
RawMatcher.ForElementMatchers(nameStartsWith("net.bytebuddy.")
.and(not(ElementMatchers.nameStartsWith(NamingStrategy.BYTE_BUDDY_RENAME_PACKAGE
+ ".")))
.or(nameStartsWith("sun.reflect.").or(nameStartsWith("jdk.internal.reflect.")))
.<TypeDescription>or(isSynthetic()))),
Collections.<Transformation>emptyList());
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]