BlackChen'site

Pinpoint 相关

Pinpoint

(查明,针尖,极微小的)

什么是APM

在信息科学和系统控制领域,APM致力于监控和管理应用软件性能和可用性。通过监测和诊断复杂应用程序的性能问题,来保证软件应用程序的良好运行(预期的服务)

APM = Application Performance Management,应用性能管理,对企业系统即时监控以实现对应用程序性能管理和故障管理的系统化的解决方案。

Pinpoint

Pinpoint 是一款全链路分析工具,提供了无侵入式的调用链监控、方法执行详情查看、应用状态信息监控等功能。基于Google Dapper论文进行的实现。

核心思想就是在服务各节点彼此调用的时候,记录并传递一个应用级别的标记,这个标记可以用来关联各个服务节点之间的关系。

关键技术点

Google Dapper

ByteCode Instrumentaton

Since bytecode instrumentation technique has to deal with Java bytecode, it tends to increase the risk of development while it decreases productivity. In addition, developers are prone to make mistakes. In Pinpoint, we improved productivity and accessibility by abstraction with the interceptor. Pinpoint injects necessary codes to track distributed transactions and performance information by intervening application code at class loading time. This increases performance since tracking codes are directly injected into the application code.

Figure 3. Basic principle of bytecode instrumentation

In Pinpoint, the API intercepting part and data recording part are separated. Interceptor is injected into the method that we’d like to track and calls before() and after() methods where data recording is taken care of. Through bytecode instrumentation, Pinpoint Agent can record data only from the necessary method which makes the size of profiling data compact.

Optimizing Performance of the Pinpoint Agent

  • Using Binary Format (Thrift) (使用二进制编码)

  • Optimize Recorded Data for Variable-Length Encoding and Format (可变长度编码)

  • Replacing Repeated API Information, SQLs, and Strings with Constant Tables (通过常量表优化重复的请求信息)

  • Handling Samples for Bulk Requests (用采样的方式处理大量的请求)

  • Minimizing Application Threads Being Aborted Using Asynchronous Data Transfer(异步传输)

  • Transferring Data via UDP (通过UDP协议进行传输)

Pinpoint 官方文章

Google Dapper

参考文章

涉及的相关技术

jvm 相关

可变长度编码

Hbase

安装

与Apache Skywalking 对比

评论