Wrap instrumentation installation with a try/catch
This commit is contained in:
parent
3f29e72317
commit
08de0b02fd
|
@ -138,8 +138,13 @@ public class AgentInstaller {
|
|||
int numInstrumenters = 0;
|
||||
for (final Instrumenter instrumenter : ServiceLoader.load(Instrumenter.class)) {
|
||||
log.debug("Loading instrumentation {}", instrumenter.getClass().getName());
|
||||
|
||||
try {
|
||||
agentBuilder = instrumenter.instrument(agentBuilder);
|
||||
numInstrumenters++;
|
||||
} catch (final Throwable e) {
|
||||
log.error("Unable to load instrumentation {}", instrumenter.getClass().getName(), e);
|
||||
}
|
||||
}
|
||||
log.debug("Installed {} instrumenter(s)", numInstrumenters);
|
||||
|
||||
|
|
Loading…
Reference in New Issue