Skip to content

Commit 3927deb

Browse files
authored
Update document (#122)
1 parent d3c32ae commit 3927deb

File tree

1 file changed

+24
-25
lines changed
  • docs/en/setup/service-agent/php-agent

1 file changed

+24
-25
lines changed

Diff for: docs/en/setup/service-agent/php-agent/README.md

+24-25
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Requirements
88

9-
- GCC
9+
- GCC / Clang
1010
- Rustc 1.65+
1111
- Cargo
1212
- Libclang 9.0+
@@ -31,28 +31,17 @@ apk add gcc make musl-dev llvm15-dev clang15-dev protobuf-c-compiler
3131

3232
The officially recommended way to install Rust is via [`rustup`](https://www.rust-lang.org/tools/install).
3333

34-
But because the source code toolchain is override by `rust-toolchain.toml`,
35-
so if you don't need multi version Rust, we recommend to install Rust by these
36-
way:
37-
38-
1. Install through OS package manager (The Rust version in the source must be >= 1.65).
39-
40-
2. Through [standalone installers](https://forge.rust-lang.org/infra/other-installation-methods.html#standalone-installers).
41-
42-
For linux x86_64 user:
43-
44-
```shell
45-
wget https://static.rust-lang.org/dist/rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz
46-
tar zxvf rust-1.65.0-x86_64-unknown-linux-gnu.tar.gz
47-
cd rust-1.65.0-x86_64-unknown-linux-gnu
48-
./install.sh
49-
```
50-
51-
3. Through `rustup` but set `default-toolchain` to none.
52-
53-
```shell
54-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none
55-
```
34+
> **Notice:** Because the source code toolchain is override by `rust-toolchain.toml`,
35+
> so if you don't need multi version Rust, we recommend to install Rust by these
36+
> way:
37+
>
38+
> 1. Install through OS package manager (The Rust version in the source must be >= 1.65).
39+
>
40+
> 2. Through `rustup` but set `default-toolchain` to none.
41+
>
42+
> ```shell
43+
> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none
44+
> ```
5645
5746
## Install
5847
@@ -86,6 +75,12 @@ make install
8675

8776
## Configure
8877

78+
For scenarios where php-fpm runs in the foreground (`php-fpm -F`), or where a PHP script starts
79+
a single Swoole server, you can use the `grpc` reporter mode.
80+
81+
For scenarios where php-fpm runs as a daemon, or where a PHP script forks multiple Swoole servers,
82+
it is recommended to use the `standalone` reporter mode.
83+
8984
Configure skywalking agent in your `php.ini`.
9085

9186
```ini
@@ -95,6 +90,9 @@ extension = skywalking_agent.so
9590
; Enable skywalking_agent extension or not.
9691
skywalking_agent.enable = Off
9792

93+
; Reporter type, optional values are `grpc`, `kafka` and `standalone`.
94+
skywalking_agent.reporter_type = grpc
95+
9896
; Log file path.
9997
skywalking_agent.log_file = /tmp/skywalking-agent.log
10098

@@ -124,5 +122,6 @@ php-fpm -F -d "skywalking_agent.enable=On"
124122
```
125123

126124
> **Notice:** It is necessary to keep the `php-fpm` process running in the foreground
127-
> (by specifying the > `-F` parameter, etc.), running `php-fpm` as a daemon will cause the
128-
> `skywalking-agent` reporter process immediately exit.
125+
> (by specifying the `-F` parameter, etc.), or switch to using the `standalone` reporter mode.
126+
> Running `php-fpm` as a daemon in `grpc` reporter mode will cause the `skywalking-agent` reporter
127+
> process immediately exit.

0 commit comments

Comments
 (0)