From 667130432c5921a2e8a3706510016f3522d5abd8 Mon Sep 17 00:00:00 2001 From: wusheng Date: Tue, 1 Dec 2015 21:04:17 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84API?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample-code/codeView.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sample-code/codeView.html b/sample-code/codeView.html index d7d9bc7e8..0f19d0869 100644 --- a/sample-code/codeView.html +++ b/sample-code/codeView.html @@ -148,6 +148,13 @@ public class XXXDBTracingDriver extends TracingDriver { <url-patternr>/request-uri</url-patternr> </filter-mappingr> +

+ 如何通过HttpClient追踪HTTP调用? +

+

使用SWTracingHttpClient封装所需的httpClient,此httpClient所有调用都会被监控

+
HttpClient httpclient = new SWTracingHttpClient(new DefaultHttpClient());
+

上下文将被存储在http request head,中,默认名称和SkyWalkingFilter保持一致。如果使用dubbox的rest提供的http请求,请使用方法重载

+
HttpClient httpclient = new SWTracingHttpClient(new DefaultHttpClient(), "");