Monitor PHP Application on Instance
Prerequisite
Install sfagent to integrate your application with SnappyFlow.
Make sure that the project and application are created in the SnappyFlow server. If not, click here to create a project and an application in SnappyFlow.
Provide the
PROFILE_KEY
,PROJECT_NAME
, andAPP_NAME
in theconfig.yaml
file.
Configuration
Download the PHP trace agent installation file.
https://raw.githubusercontent.com/snappyflow/apm-agent-php/1.9x/install_elastic_apm.sh
Use the below-given command to assign executable permission.
chmod +x install_elastic_apm.sh
Run the script with sudo and provide the tracing service name as the first argument to the script.
Example:
sudo ./install_elastic_apm.sh <service_name>
In case, if you need to update Snappyflow projectName
, appName
or profileKey
then you need to uninstall the existing PHP agent and install the agent again. While installing the agent back update the projectName
, appName
and profileKey
.
View Trace Data
Follow the below steps to view the trace data.
Go to the Application tab in SnappyFlow and navigate to your Project > Application > Dashboard.
In the dashboard window, navigate to the Tracing section and click the
View Transactions
button.You can view the traces in the Aggregate and the Real Time tabs.
Steps to Uninstall PHP Agent
Download the PHP agent configuration.
https://raw.githubusercontent.com/snappyflow/apm-agent-php/1.x/before-uninstall.sh
Use the below-given command to assign executable permission.
chmod +x ./before-uninstall.sh
Run the below script with sudo.
sudo ./before-uninstall.sh
Restart the PHP service.