From b1bb229acee15f91718879fc5434bd034387d17d Mon Sep 17 00:00:00 2001 From: wusheng Date: Tue, 1 Dec 2015 11:11:22 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=8A=E4=BC=A0web=E3=80=81jdbc=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA=E7=9A=84=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample-code/codeView.html | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/sample-code/codeView.html b/sample-code/codeView.html index f38031f9f..d7d9bc7e8 100644 --- a/sample-code/codeView.html +++ b/sample-code/codeView.html @@ -29,6 +29,7 @@ public class TracingAspectBean { return "Hello World"; } } +

注意:对于方法的追踪,仅限于实例级的public方法。其他方法由于Java运行时原因,无法追踪。

2.Spring配置文件中,配置所需如下信息。

 <bean id="tracingEnhance" class="com.ai.cloud.skywalking.plugin.spring.TracingEnhanceProcessor">
@@ -85,7 +86,8 @@ new com.ai.cloud.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve();

1.设置特定的JDBC Driver

Driver="com.ai.cloud.skywalking.plugin.jdbc.mysql.MySQLTracingDriver"

2.设置特定的JDBC URL

-

+      

+
jdbc.url=tracing:jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8

如何追踪MySQL之外的其他JDBC? @@ -125,6 +127,27 @@ public class XXXDBTracingDriver extends TracingDriver {

2.设置新实现的JDBC Driver

Driver="XXXDBTracingDriver"

3.设置特定的JDBC URL

+
jdbc.url=tracing:jdbc:xxxdb://localhost:3306/test
+ +

+ 如何追踪web服务端访问? +

+

服务端使用Filter追踪web请求

+
    <filter>
+        <filter-namer>tracingFilter</filter-namer>
+        <filter-classr>com.ai.cloud.skywalking.plugin.web.SkyWalkingFilter</filter-class>
+        <init-param>
+            <param-name>tracing-name</param-name>
+            <!--分布式埋点信息,默认放在request的header中,key=SkyWalking-TRACING-NAME,可根据需要修改-->
+            <param-value>SkyWalking-TRACING-NAME</param-value>
+        </init-param>
+    </filterr>
+    <filter-mappingr>
+        <filter-name>tracingFilter</filter-namer>
+        <!--追踪路径应为MVC的请求路径,不建议包括js/css/图片等资源路径-->
+        <url-patternr>/request-uri</url-patternr>
+    </filter-mappingr>
+