Skip to content

Commit daa9dd0

Browse files
lauritAlex Kats
authored andcommitted
Run class load listener only once (open-telemetry#12565)
1 parent 47c5ea5 commit daa9dd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/AgentInstaller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ private static void installBytebuddyAgent(
137137
.with(new RedefinitionDiscoveryStrategy())
138138
.with(AgentBuilder.DescriptionStrategy.Default.POOL_ONLY)
139139
.with(AgentTooling.poolStrategy())
140-
.with(new ClassLoadListener())
141140
.with(AgentTooling.transformListener())
142141
.with(AgentTooling.locationStrategy());
143142
if (JavaModule.isSupported()) {
@@ -172,6 +171,7 @@ private static void installBytebuddyAgent(
172171
agentListener.beforeAgent(autoConfiguredSdk);
173172
}
174173

174+
agentBuilder = agentBuilder.with(new ClassLoadListener());
175175
agentBuilder = configureIgnoredTypes(sdkConfig, extensionClassLoader, agentBuilder);
176176

177177
int numberOfLoadedExtensions = 0;

0 commit comments

Comments
 (0)