diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java index b7691cb3bb..80aeea358b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java @@ -30,6 +30,7 @@ import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader; import com.huaweicloud.sermant.core.plugin.classloader.ServiceClassLoader; import com.huaweicloud.sermant.core.utils.FileUtils; +import com.huaweicloud.sermant.god.common.SermantClassLoader; import net.bytebuddy.agent.builder.AgentBuilder; import net.bytebuddy.agent.builder.AgentBuilder.Default; @@ -326,6 +327,9 @@ private boolean isArrayOrPrimitive(TypeDescription typeDesc) { } private boolean checkClassLoader(TypeDescription typeDesc, ClassLoader classLoader) { + if (classLoader instanceof SermantClassLoader) { + return true; + } if (classLoader instanceof FrameworkClassLoader) { return true; }