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))); }
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)); }