Xapm

An APM extension for PHP, supporting Trace, Debug and Monitor.
Alternatives To Xapm
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sentry33,636
3 hours ago7November 04, 2016915otherPython
Developer-first error tracking and performance monitoring
Androidperformancemonitor6,494411a year ago10August 31, 201649apache-2.0Java
A transparent ui-block detection library for Android. (known as BlockCanary)
Myperf4j2,696
2 months ago3bsd-3-clauseJava
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Hertzbeat2,650
4 hours ago74apache-2.0Java
An open source, real-time monitoring tool with custom-monitor and agentless. Web, database, os, middleware, cloudnative, network and more. Aim to monitor everything!
Mthawkeye1,412
13 days ago12October 22, 20207mitObjective-C
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Httpreports1,15420a year ago99September 26, 20212mitC#
HttpReports is an APM (application performance monitor) system for .Net Core.
Uavstack680
4 months ago39apache-2.0Java
UAVStack Open Source All in One Repository
Rails_performance614
22 days ago39May 14, 20228mitRuby
Monitor performance of you Rails applications (self-hosted and free)
App_perf354
2 years ago2mitRuby
Open source application performance monitoring tool with emphasis on ease of setup and use. Providing similar functionality like NewRelic/AppNeta/Skylight etc.
Php Apm291
3 years ago26otherC
PHP APM (Alternative PHP Monitor)
Alternatives To Xapm
Select To Compare


Alternative Project Comparisons
Readme

Build Status

XAPM : An extension for PHP Trace

为了更好的跟踪PHP执行链路开发此扩展,传统跟踪方法需要在代码层加入Log信息从而获得链路信息,而且不同框架之间的Log方法也不一定能有效兼容。我们扩展的优点是代码层无需修改,启用so扩展后可自动获取代码执行链路,实现开发框架与Trace信息获取的解耦。

XAPM架构

扩展端(xapm)负责收集底层性能数据,缓存成文件形式,每隔一段时间通过TCP协议传输到服务端(xserver),服务端解析trace数据,排序组合成结构化信息输出&持久化存储。

Trace数据

  • 类/函数(√)
  • 执行耗时(√)
  • 单机调试(√)
  • 代码文件(√)
  • 代码行号(√)
  • 输入输出(√)
  • 数据压缩(dev)
  • 堆栈信息(dev)
  • 性能损耗测试(dev)
  • SQL慢查询分析(dev)
  • 调用链可视化

使用方式

扩展端

(1)编译源码

cd ext-src
sh build.sh

(2)module目录下的xapm.so文件拷贝到PHP extension目录

(3)php.ini启用扩展,并配置服务端信息

extension=xapm.so
[xapm]
xapm.server_ip=127.0.0.1  # 服务端IP
xapm.server_port=8010     # 服务端PORT
xapm.log_path=/tmp/trace.log   # 缓冲文件路径
xapm.log_remote=1   # 数据是否远程传输

(4)重启php-fpm

服务端

(1)编译源码

go get github.com/go-ozzo/ozzo-log
go get github.com/go-ozzo/ozzo-config
cd srv-src
sh build.sh

(2)修改config.json

"Port": "8010"    # 服务端PORT
"MaxSize": 4096   # 缓冲区大小
"Logpath": "log/xserver.log"   # 日志路径

(3)启动xserver

#推荐使用supervisor,可以用下面方式测试
nohup ./xserver &

Trace效果

单机调试

配置文件php.ini中xapm.log_remote=0时,表示数据不传输到远程,日志存储到xapm.log_path中,可以运行ext_src目录下debug脚本本地调试:

python ext_src/local_debug.py

也可以得到类似上节截图效果

性能损耗测试

http://phpbench.com/

Popular Monitor Projects
Popular Apm Projects
Popular Operations Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Php
C
Monitor
Zend
Apm