This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
89 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
.... | ||
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**) |