PHP agent on Alpine


  • SixthSense Agent - provided by Customer Support.
  • URL/IP of the SixthSense collector (your tenant URL which will be provided by Customer Support).
  • Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
  • Variables: TOKEN from the SixthSense portal. See Accessing your Access Token under Getting started with the Observability Portal.

Installing the agent from source

PHP agent is installed as PHP extension and is responsible for instrumentation of all the incoming and outgoing calls from the system. Since PHP Agent is installed as PHP extension, you will need to build the PHP extension from the source files. The following procedures helps you build the agent.

Install gPRC and Protobuf on Alpine


You need cmake version 3.13 or later.

set -ex && apk --update add --no-cache git ca-certificates autoconf automake libtool g++ make file linux-headers file re2c pkgconf openssl openssl-dev curl-dev cmake
git clone --depth 1 -b ${GRPC_RELEASE_TAG} /var/local/git/grpc
cd /var/local/git/grpc && git config --global url. git://
cd /var/local/git/grpc && git submodule update --init --recursive
cd /var/local/git/grpc/third_party/protobuf && ./
cd /var/local/git/grpc/third_party/protobuf && ./configure
cd /var/local/git/grpc/third_party/protobuf && make -j$(nproc)
cd /var/local/git/grpc/third_party/protobuf && make install
# RUN cd /var/local/git/grpc/third_party/protobuf && ldconfig
cd /var/local/git/grpc && mkdir -p cmake/build && c && cmake ../.. -DBUILD_SHARED_LIBS=ON -DgRPC_INSTALL=ON && make -j$(nproc) && make install
# add #include <limit> header in c++ file if we are getting error related to max function
./sixthsense-php-agent.tar /var/local/git/
# add apk boost boost-dev if u r getting error related to no such file or directory
cd /var/local/git/sixthsense-php-agent && phpize && ./configure && make && make install
cd /var/local/git/sixthsense-php-agent && cp php.ini /usr/local/etc/php/conf.d/ext-skywalking.ini

Installing the SixthSense agent on Alpine

  1. Copy SixthSense agent to /tmp directory to build and install the agent.
  2. Ensure that the phpize command is working. If not, install php-devel for your PHP version.
scl enable devtoolset-7 bash # (to change gcc version to v7)
cd /tmp/sixthsense-php-agent && sudo phpize && sudo ./configure && sudo make && sudo make install
sudo cp php.ini <Php extension directory base>/conf.d/ext-skywalking.ini

Configuring the PHP agent ini file

Open the sixthsense.ini file and update the following fields (php --ini shows the ini file).
skywalking.app_code = <Your_service_name>
skywalking.authentication = <Your_auth_token>
skywalking.teamID = <Your_team_id>
skywalking.enable = 1
skywalking.version = 8
skywalking.grpc = <grpc collector url>
skywalking.log_enable = 1
skywalking.proxy =
skywalking.http =
skywalking.segmentSize = 3000
skywalking.httpTimeout = 30
skywalking.segmentFlushInterval = 3
skywalking.proxy= <proxy url >

For running php-fpm, use the following command:

sudo php-fpm --nodaemonize & (won't work without the nodaemonize option)

While running using systemctl, if the file is not found and an error is displayed, run the following command.

ln /usr/local/lib64/ /usr/lib64/