Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
eeliu committed Nov 22, 2023
1 parent 5344a02 commit 9e05027
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 98 deletions.
37 changes: 9 additions & 28 deletions DOC/PHP/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ What we have supported and what will support: [support plan](SupportPlan.md)
Dependency|Version| More
---|----|----
PHP| php `7+`|
GO | |
GCC| GCC `4.7+`| C++11
cmake| cmake `3.2+`|
*inux|| `windows is on the way`
pinpoint| `2.0+`|
composer| | class can be automatic pinpoint-cut
Expand All @@ -25,9 +23,8 @@ collector-agent| [installed ?](../collector-agent/readme.md)
1. phpize
2. ./configure
3. make
4. make test TESTS=src/PHP/tests/

ps: We recommend you to test whether the module is RIGHT. For PHP5: ```make test TESTS=src/PHP/tests5/```
4. make test
ps: We recommend you to test whether the module is RIGHT. For PHP5: ```make test TESTS=tests5/```
5. make install
6. Activate pinpoint-php-module, please add the following configuration into your ```php.ini```

Expand All @@ -50,43 +47,27 @@ collector-agent| [installed ?](../collector-agent/readme.md)

We assume that you have installed composer and known how to use it. [How to Use Composer?](https://getcomposer.org/doc/00-intro.md)

1. Add ```pinpoint-apm/pinpoint-php-aop``` into composer.json and update.
```
"require": {
...
"pinpoint-apm/pinpoint-php-aop": "dev-master"
}
```
or
1. Use `composer require`
```
composer require pinpoint-apm/pinpoint-php-aop
```
2. Add the following constants in the index file of your project:

```
#################################################
define('APPLICATION_NAME','APP-2');
define('APPLICATION_ID','app-2');
define('AOP_CACHE_DIR',__DIR__.'./Cache/');
define('PLUGINS_DIR',__DIR__.'./Plugins/');
define('PINPOINT_USE_CACHE','YES');
## if yii2
define('PP_REQ_PLUGINS',\Pinpoint\Plugins\Yii2PerRequestPlugins::class);
require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
#################################################
# require_once __DIR__. '/vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';
```
1. ```APPLICATION_NAME```: Application name.
2. ```APPLICATION_ID```: Agent ID.
3. ```AOP_CACHE_DIR```: Where to generate ```Cache```.
4. ```PLUGINS_DIR```: Path to ```Plugins```.
5. ```PINPOINT_USE_CACHE```: 'YES' will not update ```Cache``` when request coming; 'No' will update ```Cache``` when every request coming.(You can also update ```Cache``` by just deleting it.) Considering the performance, we recommend 'YES'. Further more, if you modify the plugins, you should update the ```Cache``` to take effect.
6. ```require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';```: Require pinpoint's ```auto_pinpointed.php```.**Please add after ```require_once __DIR__."/../vendor/autoload.php";```, this is very important!**

1. Choose you framework and copy the directory as `Plugins` to the root of your application, autoload ```Plugins``` in ```composer.json```.
Details for frameworks:
1. [ThinkPHP5](../../plugins/PHP/Framework/ThinkPHP5)
2. [Yii2](../../plugins/PHP/Framework/Yii2)
3. [laravel](../../plugins/PHP/Framework/laravel)
4. ```require_once __DIR__. path to 'vendor/pinpoint-apm/pinpoint-php-aop/auto_pinpointed.php';```: Require pinpoint's ```auto_pinpointed.php```.**Please add after ```require_once __DIR__."/../vendor/autoload.php";```, this is very important!**

>We have prepared some examples for you, please goto [testapps](../../testapps/PHP).
>We have prepared some examples for you, try [playground](https://github.com/pinpoint-apm/pinpoint-c-agent/tree/dev/testapps#playground).


## Changes
Expand All @@ -105,7 +86,7 @@ collector-agent| [installed ?](../collector-agent/readme.md)

### 2. Why not support automatically update AOP files?

We can DO but prefer not to DO! Because we have not yet found an efficient way to implement this and monitoring these files status every time is a bad deal.
We can DO but prefer not to DO! Because we have not yet found an efficient way to implement this and monitoring these files status every time is a bad idea.

### 3. How much performance does it lose when using?

Expand Down
14 changes: 6 additions & 8 deletions DOC/PHP/SupportPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@

Framework| status | detail
---|---|---
Laravel|✔| https://github.com/laravel/laravel<br>star:60.4k
Symfony|✔| https://github.com/symfony/symfony<br>star:23.7k
Swoole|✔| https://github.com/swoole/swoole-src<br>star:16.2k
Laravel|❌| https://github.com/laravel/laravel<br>star:60.4k
Symfony|❌| https://github.com/symfony/symfony<br>star:23.7k
YII|✔| https://github.com/yiisoft/yii2<br>star:13.5k
Workerman|✔| https://github.com/walkor/workerman/<br>star:8.5k
CakePHP|✔| https://github.com/cakephp/cakephp<br>star:8.2k
ThinkPHP|✔| https://github.com/top-think/think<br>star:7.5k
EasySwoole|✔| https://github.com/easy-swoole/easyswoole<br>star:3.7k
Codeigniter|✔| https://github.com/codeigniter4/CodeIgniter4<br>star:2883
Workerman|❌| https://github.com/walkor/workerman/<br>star:8.5k
CakePHP|❌| https://github.com/cakephp/cakephp<br>star:8.2k
ThinkPHP|❌| https://github.com/top-think/think<br>star:7.5k
Codeigniter|❌| https://github.com/codeigniter4/CodeIgniter4<br>star:2883


## PHP Library
Expand Down
5 changes: 5 additions & 0 deletions DOC/PY/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ $ pip install pinpointPy
> include middleware
```
from pinpointPy import set_agent, monkey_patch_for_pinpoint, use_thread_local_context
use_thread_local_context()
monkey_patch_for_pinpoint()
set_agent("cd.dev.test.py", "cd.dev.test.py",
'tcp:dev-collector:10000', -1)
app = Flask(__name__)
app.wsgi_app = PinPointMiddleWare(app,app.wsgi_app)
```
Expand Down
65 changes: 4 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Pinpoint](images/logo.png)
![pinpoint](images/logo.png)

[![Build](https://github.com/pinpoint-apm/pinpoint-c-agent/workflows/Build/badge.svg?branch=master)](https://github.com/pinpoint-apm/pinpoint-c-agent/actions) [![Gitter](https://badges.gitter.im/naver/pinpoint-c-agent.svg)](https://gitter.im/naver/pinpoint-c-agent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![codecov](https://codecov.io/gh/pinpoint-apm/pinpoint-c-agent/branch/master/graph/badge.svg?token=KswbmFvWp3)](https://codecov.io/gh/pinpoint-apm/pinpoint-c-agent) [![License](https://img.shields.io/github/license/pinpoint-apm/pinpoint-c-agent)](LICENSE)

Expand Down Expand Up @@ -42,7 +42,7 @@ It is an agent written by C++, PHP and Python languages. And we hope to support
* Collector-Agent (**Required**)
* PHP-Agent
* Python-Agent
* c/cpp=Agent
* c/cpp Agent
* Golang-Agent

### Install Collector-Agent
Expand Down Expand Up @@ -77,67 +77,10 @@ golang|[go-aop-agent](https://github.com/pinpoint-apm/go-aop-agent)
</details>

## Contributing
We are looking forward to your contributions via pull requests.

### Contributors

<table>
<tr>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/eeliu>
<img src=https://avatars.githubusercontent.com/u/27064129?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=eeliu/>
<br />
<sub style="font-size:7px"><b>eeliu</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/EyelynSu>
<img src=https://avatars.githubusercontent.com/u/41946743?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Evelyn/>
<br />
<sub style="font-size:7px"><b>Evelyn</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/Zoey-dot>
<img src=https://avatars.githubusercontent.com/u/59548335?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Zoey/>
<br />
<sub style="font-size:7px"><b>Zoey</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/ChenGXQQ>
<img src=https://avatars.githubusercontent.com/u/20234781?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=chenguoxi/>
<br />
<sub style="font-size:7px"><b>chenguoxi</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/marty-macfly>
<img src=https://avatars.githubusercontent.com/u/12715929?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Macfly/>
<br />
<sub style="font-size:7px"><b>Macfly</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/mayingping-Bella>
<img src=https://avatars.githubusercontent.com/u/72844069?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=mayingping-Bella/>
<br />
<sub style="font-size:7px"><b>mayingping-Bella</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center" style="word-wrap: break-word; width: 75.0; height: 75.0">
<a href=https://github.com/emeroad>
<img src=https://avatars.githubusercontent.com/u/7564547?v=4 width="50;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Woonduk Kang/>
<br />
<sub style="font-size:7px"><b>Woonduk Kang</b></sub>
</a>
</td>
</tr>
</table>

We are looking forward to your contributions via pull requests.

https://github.com/pinpoint-apm/pinpoint-c-agent/graphs/contributors

## License
This project is licensed under the Apache License, Version 2.0.
Expand Down
2 changes: 1 addition & 1 deletion setup_pypi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
extFiles.append(str(a_file))

setup(name='pinpointPy',
version="1.1.0", # don't forget update __version__ in pinpointPy/__init__.py
version="1.1.1", # don't forget update __version__ in pinpointPy/__init__.py
author="cd_pinpoint members",
author_email='dl_cd_pinpoint@navercorp.com',
license='Apache License 2.0',
Expand Down

0 comments on commit 9e05027

Please sign in to comment.