Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
fix #4 #5 #7 #6
Browse files Browse the repository at this point in the history
  • Loading branch information
songzhian committed Mar 18, 2018
1 parent 90b6e9e commit b5f13fa
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -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扩展
Expand All @@ -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版本扩展支持
* 更多系统支持
Expand Down
51 changes: 51 additions & 0 deletions sdk-php/README_ZH.md
Original file line number Diff line number Diff line change
@@ -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);

....
....
26 changes: 2 additions & 24 deletions sky-php7ext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**)
30 changes: 30 additions & 0 deletions sky-php7ext/README_ZH.md
Original file line number Diff line number Diff line change
@@ -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**)

0 comments on commit b5f13fa

Please sign in to comment.