public Task SaveSpans(SaveSpansArgs args)
        {
            var vr = SaveSpansArgs.Validate(args);

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

            LogInfo(args.Items.Count.ToString(), "SaveSpans");
            return(_commandQueue.Enqueue(SaveSpansCommand.Create(args)));
        }
Exemple #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));
        }