Пример #1
0
        private static async Task RestSharpClientTrace(IOwinContext context)
        {
            IRestClient restSharpClient = new RestClient("http://localhost:9000/api");
            var         restClient      = new TraceRestClient(restSharpClient);

            var request = new RestRequest(Method.GET);

            GetTraceContext(request, context, restClient);
            var response = restClient.Execute(request);
            await context.Response.WriteAsync(response.ToString());
        }
Пример #2
0
        private static void GetTraceContext(IRestRequest request, IOwinContext context, TraceRestClient restSharpClient)
        {
            var b3FormatTrace       = restSharpClient.RestClientHandler.GetTrace();
            var b3FormatTraceParsed = b3FormatTrace.Split('-');

            AddTraceHeaders(request, b3FormatTraceParsed, b3FormatTrace);
        }