From b5f13fa1a000977c63b03a739fa93945cb13a256 Mon Sep 17 00:00:00 2001 From: songzhian Date: Sun, 18 Mar 2018 21:09:30 +0800 Subject: [PATCH] fix #4 #5 #7 #6 --- README.md | 4 ++-- README_ZH.md | 8 +++---- sdk-php/README_ZH.md | 51 ++++++++++++++++++++++++++++++++++++++++ sky-php7ext/README.md | 26 ++------------------ sky-php7ext/README_ZH.md | 30 +++++++++++++++++++++++ 5 files changed, 89 insertions(+), 30 deletions(-) create mode 100644 sdk-php/README_ZH.md create mode 100644 sky-php7ext/README_ZH.md diff --git a/README.md b/README.md index 49464a61..74f9b464 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Sky Walking for php SDK| [中文](README.md) ========== **SkyWalking php SDK**: A client tool developed for PHP using SkyWalking APM tools. (It is a pity that it only supports writing log and checking curl currently.) -SkyWalking APM : https://github.com/OpenSkywalking/skywalking +SkyWalking APM : https://github.com/apache/incubator-skywalking * Automatic probe for PHP. **You don't need to modify the application code.** * It is a PHP extension developed by zendAPI. @@ -20,7 +20,7 @@ SkyWalking APM : https://github.com/OpenSkywalking/skywalking # Apply to * version 1.0 applies to Skywalking 3.1 . - +* version 2.0 applies to Skywalking 3.X . # In the future. * more php versions. * more os. diff --git a/README_ZH.md b/README_ZH.md index 6f0aab05..6b5521c6 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -3,7 +3,7 @@ Sky Walking SDK for PHP | [English](README_EN.md) **SkyWalking php SDK**: 针对SkyWalking APM工具为php开发的客户端工具 (目前只支持写日志方式和只针对curl检测) -SkyWalking APM : https://github.com/OpenSkywalking/skywalking +SkyWalking APM : https://github.com/apache/incubator-skywalking * PHP 自动探针 **不需要修改应用程序代码** * 使用zendAPI开发的 php扩展 @@ -17,12 +17,12 @@ SkyWalking APM : https://github.com/OpenSkywalking/skywalking # 使用安装 -* php扩展包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sky-php7ext) -* php代码类包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sdk-php) +* php扩展包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sky-php7ext/README_ZH.md) +* php代码类包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sdk-php/README_ZH.md) # 对应版本支持 * 1.0对应版本:Skywalking 3.1 - +* 2.0对应版本:Skywalking 3.x # 将要完成 * 其它php版本扩展支持 * 更多系统支持 diff --git a/sdk-php/README_ZH.md b/sdk-php/README_ZH.md new file mode 100644 index 00000000..bf772d42 --- /dev/null +++ b/sdk-php/README_ZH.md @@ -0,0 +1,51 @@ +# PHP SkyWalking : SkyWalking PHP ͻ + + +--- + +- [װ](#installation) +- [Ҫ](#requirements) +- [ٿʼʵ](#quick-start-and-examples) + +--- + +### Installation + +ʹðװ SkyWalking , : + + +### Requirements + +PHP Curl Class works with PHP 5.2 - 7.9.99 , and HHVM. + +### Quick Start and Examples + + // must put these code at the beginning !!! + // that would auto register shutdown function !!! + + include_once ("./sdk-php/SkyWalking.php");// or use composer + + //LOG_PATH is skywalking's logfile path + SkyWalking::getInstance("api")->setLogPath(LOG_PATH)->setSamplingRate(5); + + .... + .... + + $ch = curl_init(); + curl_setopt($ch); + + .... + .... + + SkyWalking::getInstance()->startSpanOfCurl("www.api.com", $headers); + + .... + .... + + curl_setopt($ch); + $rs = curl_exec($ch); + + SkyWalking::getInstance()->endSpanOfcurl($ch); + + .... + .... \ No newline at end of file diff --git a/sky-php7ext/README.md b/sky-php7ext/README.md index ce431e6f..b417f4eb 100644 --- a/sky-php7ext/README.md +++ b/sky-php7ext/README.md @@ -24,31 +24,9 @@ copy ini to php.ini the current phpext works with PHP 7.0-7.9.99 。 this extension references something external, use with: pphcurl、phpjson and phpstandard - +need to install, Please refer to: https://github.com/grpc/grpc/blob/master/INSTALL.md ### Documentation - https://github.com/OpenSkywalking/skywalking/wiki ### Quick Start and Examples -set php.ini skywalking.auto_open = On (Automatic writing **Ignore the following**) -OR skywalking.auto_open = OFF (the project int code )As below: - - // must put these code at the beginning !!! - - .... - .... - - - $ch = curl_init(); - curl_setopt($ch); - - SkyWalking::getInstance()->startSpanOfCurl("www.api.com", $headers); - .... - .... - - curl_setopt($ch); - $rs = curl_exec($ch); - - SkyWalking::getInstance()->endSpanOfcurl($ch); - - .... - .... +set php.ini skywalking.auto_open = On (Automatic writing **Ignore the following**) \ No newline at end of file diff --git a/sky-php7ext/README_ZH.md b/sky-php7ext/README_ZH.md new file mode 100644 index 00000000..26c88e24 --- /dev/null +++ b/sky-php7ext/README_ZH.md @@ -0,0 +1,30 @@ +# PHP SkyWalking Class: SkyWalking PHP client + + +--- + +- [安装](#installation) +- [要求](#requirements) +- [Quick Start and Examples](#quick-start-and-examples) + +--- + +### Installation +快速安装 + +复制ini内容到php.ini + + git clone https://github.com/SkywalkingContrib/skywalking-php-sdk.git + cd skywalking-php-sdk/sky-php7ext + phpize + ./configure + make -j [number_of_processor_cores] # eg. make -j 4 + make install +### Requirements + +扩展支持版本 7.0-7.9.99 。 +这个扩展需要其他扩展支持: pphcurl、phpjson和phpstandard 包 +需要安装GRPC 请参照 : https://github.com/grpc/grpc/blob/master/INSTALL.md + +### 快速启动 +设置 php.ini skywalking.auto_open = On (自动开启信息抓取 **Ignore the following**)