Agent tooling already has access to bootstrap proxy
MODIFY
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentInstaller.java
javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentInstaller.java
@@ -145,7 +145,7 @@ public class AgentInstaller {
.with(AgentBuilder.DescriptionStrategy.Default.POOL_ONLY)
.with(AgentTooling.poolStrategy())
.with(new ClassLoadListener())
- .with(AgentTooling.locationStrategy(Utils.getBootstrapProxy()));
+ .with(AgentTooling.locationStrategy());
if (JavaModule.isSupported()) {
agentBuilder = agentBuilder.with(new ExposeAgentBootstrapListener(inst));
}

MODIFY
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/AgentTooling.java
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/AgentTooling.java
@@ -17,7 +17,7 @@ import net.bytebuddy.agent.builder.AgentBuilder;
public final class AgentTooling {
private static final AgentLocationStrategy LOCATION_STRATEGY =
- locationStrategy(getBootstrapProxy());
+ new AgentLocationStrategy(getBootstrapProxy());
private static final AgentBuilder.PoolStrategy POOL_STRATEGY =
new AgentCachingPoolStrategy(LOCATION_STRATEGY);
@@ -26,10 +26,6 @@ public final class AgentTooling {
return LOCATION_STRATEGY;
}
- public static AgentLocationStrategy locationStrategy(ClassLoader bootstrapProxy) {
- return new AgentLocationStrategy(bootstrapProxy);
- }
-
public static AgentBuilder.PoolStrategy poolStrategy() {
return POOL_STRATEGY;
}

Agent tooling already has access to bootstrap proxy (#5802)