diff --git a/README.md b/README.md index 42c8da1d5120871b1aa1f18a37098643d22f58bd..63e75dacb4106ed0dbb033cda250d9701c0e87c5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Sky Walking for php SDK| [中文](README_ZH.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 php SDK**: A client tool developed for PHP using SkyWalking APM tools. (It is a pity that it only supports checking curl currently.) SkyWalking APM : https://github.com/apache/incubator-skywalking * Automatic probe for PHP. **You don't need to modify the application code.** @@ -11,12 +11,41 @@ SkyWalking APM : https://github.com/apache/incubator-skywalking * It is a php extension and contains some php classes. * It can compatible any versions of php.You can look over the codes in the class 'SkyWalking'. * You need to add business codes to monnitor. - +# Dep +* pkg-config +* grpc +* protoc +* php 7+ -# Using and installing -* php extensions(https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/master/sky-php7ext) -* php classes (https://github.com/SkywalkingContrib/skywalking-php-sdk/tree/master/sdk-php) + +# Install +1. build php extension +```shell +git clone --recurse-submodules https://github.com/SkywalkingContrib/skywalking-php-sdk.git +cd sky-php7ext +phpize && ./configure && make && make install +``` + +2. make report_client +```shell +cd sky-php7ext/report +make +``` + +# Config +* php.ini +```shell +extension=skywalking.so +skywalking.app_code = app_code +skywalking.grpc = 127.0.0.1:11800 +``` + +# Run +```shell +php-fpm +./report_client 120.0.0.1:11800 /tmp +``` # Apply to * version 1.0 applies to Skywalking 3.1 .