use of com.navercorp.pinpoint.profiler.plugin.GuardProfilerPluginSetupContext in project pinpoint by naver.
the class MockPluginSetup method setupPlugin.
@Override
public PluginSetupResult setupPlugin(ProfilerPluginGlobalContext globalContext, ProfilerPlugin plugin, ClassInjector classInjector) {
final ProfilerConfig profilerConfig = globalContext.getConfig();
final DefaultProfilerPluginSetupContext pluginSetupContext = new DefaultProfilerPluginSetupContext(globalContext);
final GuardProfilerPluginSetupContext guardPluginSetupContext = new GuardProfilerPluginSetupContext(pluginSetupContext);
ClassFileTransformerLoader classFileTransformerLoader = new ClassFileTransformerLoader(profilerConfig, dynamicTransformTrigger);
InstrumentContext instrumentContext = new PluginInstrumentContext(profilerConfig, instrumentEngine, dynamicTransformTrigger, classInjector, classFileTransformerLoader);
try {
preparePlugin(plugin, instrumentContext);
plugin.setup(guardPluginSetupContext);
} finally {
guardPluginSetupContext.close();
}
PluginSetupResult setup = new PluginSetupResult(pluginSetupContext, classFileTransformerLoader);
return setup;
}
Aggregations