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(), "");