wu-sheng commented on code in PR #561:
URL: https://github.com/apache/skywalking-java/pull/561#discussion_r1239792018
##########
apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java:
##########
@@ -91,9 +95,11 @@ public static void premain(String agentArgs, Instrumentation
instrumentation) th
return;
}
- final ByteBuddy byteBuddy = new
ByteBuddy().with(TypeValidation.of(Config.Agent.IS_OPEN_DEBUGGING_CLASS));
+ LOGGER.info("Skywalking agent begin to install transformer ...");
+ String nameTrait = getNameTrait();
+ DelegateNamingResolver.setNameTrait(nameTrait);
Review Comment:
These two should move inside `newAgentBuilder`. And `"sw$"` should be moved
into `Constants`. And `SWNativeMethodStrategy` doesn't need to forward this,
`DelegateNamingResolver#NAME_TRAIT` should be removed too.
Let's reduce those unnecessary codes.
--
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]