Exemple #1
0
        public async Task CallTraceApi(CallTraceApiArgs args)
        {
            var saveSpans     = CreateSaveClientSpans(args);
            var saveSpansArgs = SaveSpansArgs.Create(saveSpans.ToArray());

            var apiProxy = ApiProxyContext.Current;
            await apiProxy.SaveSpans(saveSpansArgs);
        }
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));
        }