public Task SaveSpans(SaveSpansArgs args)
        {
            var isOk = CheckApiStatusOkSmart();

            if (!isOk)
            {
                return(_nullApiProxy.SaveSpans(args));
            }
            return(SafeInvokeTask(Proxy.SaveSpans(args)));
        }
Example #2
0
        public Task SendApiSpans(IList <IClientSpan> clientSpans)
        {
            var args = SaveSpansArgs.Create(clientSpans.ToArray());

            var vr = SaveSpansArgs.Validate(args);

            if (!vr.Success)
            {
                LogInfo(vr.Message + " => " + vr.Data.ToJson(false));
                return(Task.FromResult(0));
            }

            return(_apiProxy.SaveSpans(args));
        }