Merge pull request #966 from DataDog/landerson/wrap-instrumentation-install
Wrap instrumentation installation with a try/catch
This commit is contained in:
commit
d03d583e85
|
@ -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());
|
||||
agentBuilder = instrumenter.instrument(agentBuilder);
|
||||
numInstrumenters++;
|
||||
|
||||
try {
|
||||
agentBuilder = instrumenter.instrument(agentBuilder);
|
||||
numInstrumenters++;
|
||||
} catch (final Exception | LinkageError e) {
|
||||
log.error("Unable to load instrumentation {}", instrumenter.getClass().getName(), e);
|
||||
}
|
||||
}
|
||||
log.debug("Installed {} instrumenter(s)", numInstrumenters);
|
||||
|
||||
|
|
Loading…
Reference in New Issue