예제 #1
0
        public void SendData <T>(string methodName, T args)
        {
            if (!_enabled)
            {
                return;
            }

            int retryCount = 0;

            while (retryCount < 3)
            {
                try {
                    _proxy.Invoke <T, RpcNull>(methodName, args);
                    return;
                } catch (Exception ex) {
                    SystemLog.Warn(LogEventID.TracingFailed, ex, "TracingSniffer<{0}> Failed! try: {1}", _url, retryCount);
                    Thread.Sleep(3000 * retryCount);
                    retryCount++;
                }
            }

            _enabled = false;
            _queueTracing.Dispose();
            _queueSystemLog.Dispose();
            SystemLog.Warn(LogEventID.TracingFailed, "TracingSniffer<{0}> over MaxError, AutoDisabled", _url);
            TracingManager.RemoveSniffer(Url);
        }