Search in sources :

Example 1 with MethodSpanInvokeChainHandler

use of com.creditease.uav.apm.invokechain.handlers.MethodSpanInvokeChainHandler in project uavstack by uavorg.

the class InvokeChainSupporter method start.

@Override
public void start() {
    // init the simple invokechain dataloggermgr
    dlm = this.newDataLoggerManager("ivc", "com.creditease.uav.invokechain");
    /**
     * NOTE: when start the invokechain, we have to clean all ivc logs & lock files
     */
    dlm.clearLogs();
    ServerVendor vendor = (ServerVendor) UAVServer.instance().getServerInfo(CaptureConstants.INFO_APPSERVER_VENDOR);
    // MSCP
    if (vendor == ServerVendor.MSCP) {
    // TODO
    } else // JEE
    {
        // register ServiceStartInvokeChainHandler to GlobalFilter
        GlobalFilterDispatchListener listener = (GlobalFilterDispatchListener) InterceptSupport.instance().getEventListener(GlobalFilterDispatchListener.class);
        listener.registerHandler(new JEEServiceRunGlobalFilterHandler("JEEServiceRunGlobalFilterHandler"));
    }
    // register ServiceEndInvokeChainHandler
    handlerMap.put(InvokeChainConstants.CHAIN_APP_SERVICE, new ServiceSpanInvokeChainHandler());
    // register ClientSpanInvokeChainHandler
    handlerMap.put(InvokeChainConstants.CHAIN_APP_CLIENT, new ClientSpanInvokeChainHandler());
    // register MethodSpanInvokeChainHandler
    handlerMap.put(InvokeChainConstants.CHAIN_APP_METHOD, new MethodSpanInvokeChainHandler());
}
Also used : MethodSpanInvokeChainHandler(com.creditease.uav.apm.invokechain.handlers.MethodSpanInvokeChainHandler) JEEServiceRunGlobalFilterHandler(com.creditease.uav.apm.invokechain.jee.JEEServiceRunGlobalFilterHandler) ServerVendor(com.creditease.monitor.UAVServer.ServerVendor) GlobalFilterDispatchListener(com.creditease.uav.appserver.listeners.GlobalFilterDispatchListener) ServiceSpanInvokeChainHandler(com.creditease.uav.apm.invokechain.handlers.ServiceSpanInvokeChainHandler) ClientSpanInvokeChainHandler(com.creditease.uav.apm.invokechain.handlers.ClientSpanInvokeChainHandler)

Aggregations

ServerVendor (com.creditease.monitor.UAVServer.ServerVendor)1 ClientSpanInvokeChainHandler (com.creditease.uav.apm.invokechain.handlers.ClientSpanInvokeChainHandler)1 MethodSpanInvokeChainHandler (com.creditease.uav.apm.invokechain.handlers.MethodSpanInvokeChainHandler)1 ServiceSpanInvokeChainHandler (com.creditease.uav.apm.invokechain.handlers.ServiceSpanInvokeChainHandler)1 JEEServiceRunGlobalFilterHandler (com.creditease.uav.apm.invokechain.jee.JEEServiceRunGlobalFilterHandler)1 GlobalFilterDispatchListener (com.creditease.uav.appserver.listeners.GlobalFilterDispatchListener)1