提交 b5f13fa1 编写于 作者: S songzhian

fix #4 #5 #7 #6

上级 90b6e9ef
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.
......
......@@ -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版本扩展支持
* 更多系统支持
......
# 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
......@@ -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
# 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**)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册