Skip to content

Commit

Permalink
update reademe (pinpoint-apm#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
eeliu authored and liu.mingyi committed Dec 21, 2021
1 parent b8b5a7b commit f3f38db
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,45 @@ This could be found in PHP/pinpoint_php_example/app/index.php.
require_once __DIR__."/../vendor/autoload.php";

// A writable path for caching AOP code
define('AOP_CACHE_DIR',__DIR__.'/Cache/');
define('AOP_CACHE_DIR',__DIR__.'/../Cache/');
// Your plugins directory: All plugins must have a suffix "Plugin.php",as "CommonPlugin.php mysqlPlugin.php RPCPlugin.php"
define('PLUGINS_DIR',__DIR__.'/../Plugins/');
// since 0.2.3 supports user filter when loadering a class.
define('USER_DEFINED_CLASS_MAP_IMPLEMENT','\Plugins\ClassMapInFile.php');
// since 0.2.5+ PINPOINT_USE_CACHE = N, auto_pinpointed.php will generate Cache/* on every request.
define('PINPOINT_USE_CACHE','no');
define('PINPOINT_USE_CACHE','YES');
// Use pinpoint-php-aop auto_pinpointed.php instead of vendor/autoload.php
require_once __DIR__. '/../vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';

```
#### How to use setting.ini
#### setting.ini

Namespace conversion table for special class/function

> How to use?
[setting.ini](lib/Pinpoint/test/setting.ini)


> Read the setting.ini comments


### How it works

pinpoint-php-aop wrappers your class with an onBefore/onEnd/onException suite.
* Use `nikic/PHP-Parser` generating glue layer code

* Use namespace replace to reuse plugins or hook build-in class/function
* Intercept php classloader to redirect origin class bettween proxied class


> pinpoint-php-aop wrappers your class with an onBefore/onEnd/onException suite.
#### Data Chart Map

![how it works](https://raw.githubusercontent.com/pinpoint-apm/pinpoint-c-agent/master/images/principle_v0.2.x.png)

More details please go to lib/pinpoint/test/Comparison/pinpoint/test

> If you found a bug, please create an issue to us without any hesitate.

> If it could help you, please give us a star as a support! Thanks!
> PS: If you found a bug, please create an issue to us without any hesitate.

## Copyright

Expand Down

0 comments on commit f3f38db

Please sign in to comment.