- 如何追踪注册在Spring中类实例的本地方法调用? + 如何追踪注册在Spring中类实例的方法调用?
1.在需要追踪的方法上,加上@Tracing标识。
@@ -33,7 +33,7 @@ public class TracingAspectBean {
<bean id="tracingEnhance" class="com.ai.cloud.skywalking.plugin.spring.TracingEnhanceProcessor">
-
+ 3.通过Spring标注,或配置文件将TracingAspectBean注册到Spring Context上下文中
如何追踪dubbo调用?
@@ -79,7 +79,53 @@ new com.ai.cloud.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve();
4.客户端如果直接使用非dubbox客户端发起调用,需要在发送的参数中设置contextData。
- ++ 如何追踪MySQL访问? +
+1.设置特定的JDBC Driver
+Driver="com.ai.cloud.skywalking.plugin.jdbc.mysql.MySQLTracingDriver"+
2.设置特定的JDBC URL
+ + ++ 如何追踪MySQL之外的其他JDBC? +
+1.轻松实现自定义的JDBC Driver扩展
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+import com.ai.cloud.skywalking.plugin.jdbc.TracingDriver;
+
+public class XXXDBTracingDriver extends TracingDriver {
+ static {
+ try {
+ DriverManager.registerDriver(new MySQLTracingDriver());
+ } catch (SQLException e) {
+ throw new RuntimeException("register "
+ + MySQLTracingDriver.class.getName() + " driver failure.");
+ }
+ }
+
+ /**
+ * 继承自TracingDriver,返回真实的Driver
+ */
+ @Override
+ protected Driver registerTracingDriver() {
+ try {
+ //示例:return new com.mysql.jdbc.Driver();
+ return new Driver();
+ } catch (SQLException e) {
+ throw new RuntimeException("create Driver failure.");
+ }
+ }
+
+}
+
+ 2.设置新实现的JDBC Driver
+Driver="XXXDBTracingDriver"+
3.设置特定的JDBC URL
+ diff --git a/sample-code/images/sampleAppClusterView.jpeg b/sample-code/images/sampleAppClusterView.jpeg new file mode 100644 index 000000000..36db7b658 Binary files /dev/null and b/sample-code/images/sampleAppClusterView.jpeg differ diff --git a/sample-code/images/slide2.jpg b/sample-code/images/slide2.jpg deleted file mode 100755 index b12393e52..000000000 Binary files a/sample-code/images/slide2.jpg and /dev/null differ diff --git a/sample-code/images/slide3.jpg b/sample-code/images/slide3.jpg deleted file mode 100755 index 72e195d9c..000000000 Binary files a/sample-code/images/slide3.jpg and /dev/null differ diff --git a/sample-code/images/slide4.jpg b/sample-code/images/slide4.jpg deleted file mode 100755 index 12f06184b..000000000 Binary files a/sample-code/images/slide4.jpg and /dev/null differ diff --git a/sample-code/images/slide5.jpg b/sample-code/images/slide5.jpg deleted file mode 100755 index 1f550132d..000000000 Binary files a/sample-code/images/slide5.jpg and /dev/null differ diff --git a/sample-code/uiView.html b/sample-code/uiView.html index e749b3946..43ea48067 100755 --- a/sample-code/uiView.html +++ b/sample-code/uiView.html @@ -27,14 +27,11 @@-
-
-
-
+
+
+ 
-
- 
- 