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

Commit

Permalink
Merge pull request #1 from SkywalkingContrib/songzhian
Browse files Browse the repository at this point in the history
Songzhian
  • Loading branch information
songzhian authored Nov 11, 2017
2 parents 41e12fc + c00efab commit fe35032
Show file tree
Hide file tree
Showing 49 changed files with 3,933 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.deps
sky-php7ext\.idea
sky-php7ext\*.lo
sky-php7ext\*.la
sky-php7ext\.libs
sky-php7ext\acinclude.m4
sky-php7ext\aclocal.m4
sky-php7ext\autom4te.cache
sky-php7ext\build
sky-php7ext\config.guess
sky-php7ext\config.h
sky-php7ext\config.h.in
sky-php7ext\config.log
sky-php7ext\config.nice
sky-php7ext\config.status
sky-php7ext\config.sub
sky-php7ext\configure
sky-php7ext\configure.in
sky-php7ext\include
sky-php7ext\install-sh
sky-php7ext\libtool
sky-php7ext\ltmain.sh
sky-php7ext\Makefile
sky-php7ext\Makefile.fragments
sky-php7ext\Makefile.global
sky-php7ext\Makefile.objects
sky-php7ext\missing
sky-php7ext\mkinstalldirs
sky-php7ext\modules
sky-php7ext\run-tests.php
sky-php7ext\tests/*/*.diff
sky-php7ext\tests/*/*.out
sky-php7ext\tests/*/*.php
sky-php7ext\tests/*/*.exp
sky-php7ext\tests/*/*.log
sky-php7ext\tests/*/*.sh
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,32 @@
# skywalking-php-sdk
A manual PHP tracing SDK, compatible with skywalking APM
Sky Walking SDK for PHP | [English](README_EN.md)
==========


**SkyWalking php SDK**: 针对SkyWalking APM工具为php开发的客户端工具 (目前只支持写日志方式和只针对curl检测)
SkyWalking APM : https://github.com/OpenSkywalking/skywalking

* PHP 自动探针 **不需要修改应用程序代码**
* 使用zendAPI开发的 php扩展
* 自动钩子,自动SkyWalking节点收集日志。
* 自动链路header传输
* 手动探针
* php扩展 和 php代码sdk类包
* php代码SkyWalking类进行php各种版本兼容
* 需要植入业务代码进行监控


# wiki文档
* [WIKI](https://github.com/OpenSkywalking/skywalking/wiki)



# 使用安装
* php扩展包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sky-php7ext)
* php代码类包(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/songzhian/sdk-php)

# 对应版本支持
* 1.0对应版本:Skywalking 3.1

# 将要完成
* 其它php版本扩展支持
* 更多系统支持
4 changes: 4 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sky Walking for php SDK| [中文](README.md)
==========
# skywalking-php-sdk
A manual PHP tracing SDK, compatible with skywalking APM
1 change: 1 addition & 0 deletions sdk-php/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
51 changes: 51 additions & 0 deletions sdk-php/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# PHP SkyWalking Class: SkyWalking PHP client


---

- [Installation](#installation)
- [Requirements](#requirements)
- [Quick Start and Examples](#quick-start-and-examples)

---

### Installation

To install PHP SkyWalking Class, simply:


### Requirements

PHP Curl Class works with PHP 5.0,5.3, 5.4, 5.5, 5.6, 7.0, and HHVM.

### Quick Start and Examples

// must put these code at the beginning !!!
// that would auto register shutdown function !!!

include_once ("./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($curl);

....
....
Loading

0 comments on commit fe35032

Please sign in to comment.