Fix warning on agent startup (#2109)

This commit is contained in:
Lauri Tulmin 2021-01-25 17:03:41 +02:00 committed by GitHub
parent bbcbeb51e3
commit 59c1034d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ public class MethodInstrumentationModule extends InstrumentationModule {
// generate any TypeInstrumentation for muzzle to analyze
@Override
protected String[] additionalHelperClassNames() {
return new String[] {"io.opentelemetry.javaagent.instrumentation.methods.MethodTracer"};
return typeInstrumentations.isEmpty()
? new String[0]
: new String[] {"io.opentelemetry.javaagent.instrumentation.methods.MethodTracer"};
}
@Override