This is an example app where three php services use easeagent-sdk-php.
This example has two services: frontend and backend. They both report trace data to zipkin.
To setup the demo, do
composer install
Once the dependencies are installed, run the services:
# Run zipkin (optional):
composer run-zipkin
# In terminal 1:
composer run-frontend
# In terminal 2
composer run-backend
And then, request the frontend:
curl http://localhost:8081
- This starts a trace in the frontend (http://localhost:8081/)
- Continues the trace and calls the backend (http://localhost:9000)
- Next, you can view traces that went through the backend via http://localhost:9411/?serviceName=frontend.
If you need to pass the MegaEase Cloud endpoint, please download the agent.yml
from MegaEase Cloud. By Details.
MEGAEASE_CLOUD_URL
and TLS
will be filled in for you automatically.
Replace agent.yml
with the configuration file in the configs
directory. Then run it.
if you have your self easeagent-sdk-php
and want to use, please add repositories
to composer.json like this:
"repositories": {
"0": {
"type": "path",
"url": "../easeagent-sdk-php",
"options": {
"symlink": true
}
}
},