Phpio
Cross request trace for PHP,like google's dapper,twitter's zipkin
Install / Use
/learn @hemon/PhpioREADME
PHPIO
Cross request trace for PHP,like google's dapper,twitter's zipkin.
It's base on AOP-PHP extension.
A new fork of AOP-PHP is support PHP 7.0 or later, thanks pangudashu
PHPIO is focus on trace IO operation, such like Curl, MySQL, Memcache, Redis, APC.
It's easily write your own Hooker monitor function/class operation in 10 line code.
- Common
connection's host and port, call trace, function args, response and error message. - MySQL, PDO
record raw SQL query stirng and affected rows. - Curl
record raw http header(request & response), and reporting the full infomation of time,speed and size. - Memcached, Redis
record key for operation, the real server where key is mapped to. - Exception, Error
record errno and errmsg for Exception and Error. - Call Graph
call graph is svg format, click map node redirect to source. - Source viewer
you can see all your source code which been executed. - Cross Request Tracking
A unique request_id is auto inject in Cookie for track http request from frontpage to webservice api, just use a Redis logger can collecting logs from all your php web servers.

Install aop extension
php5.5
pecl install aop-beta
php7.0 +
git clone https://github.com/pangudashu/AOP.git
cd AOP/
phpize
./configure
make && make install
php.ini
[aop]
extension=aop.so
if coredump ?
- change you aop extension version (the pecl version is stable than github)
- rebuild php
get phpio
download tarball
wget https://github.com/hemon/phpio/tarball/master -O phpio.tar.gz
tar xvf phpio.tar.gz
or git clone
git clone https://hemon@github.com/hemon/phpio
prepend phpio.php
php.ini
auto_prepend_file = /path/to/phpio/phpio.php
php-fpm
php_admin_value[auto_prepend_file] = /path/to/phpio/phpio.php
start profile
run you php programs with param _debug_phpio=1
$_REQUEST['_debug_phpio']=1
$_COOKIE['_debug_phpio']=1
$_SERVER['_debug_phpio']=1
for example : http://www.example.com/index.php?_debug_phpio=1
recommand firfox addon easy-xdebug, it can auto append user defined cookie param in request(default is _debug_phpio=1):
in php-cli mode, use export command to set param for $_SERVER
export _debug_phpio=1
view profile
make phpio/www is accessible:
http://localhost/phpio/www/
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
