This is an example app where three .NET services use easeagent-sdk-net.
In order to build the example, you need to install a tow things:
This example has two services: frontend and backend. They both report trace data to zipkin.
To setup the demo, do
$ pwd
~/easeagent-sdk-net/
$ ./source.sh
Once the dependencies are installed, run the services:
# Run zipkin (optional):
docker run -p 9411:9411 -d openzipkin/zipkin
# In terminal 1:
$ pwd
~/easeagent-sdk-net/Examples/aspnetcore/backend
$ EASEAGENT_CONFIG=`pwd`/agent_backend.yml dotnet run
# In terminal 2
$ pwd
~/easeagent-sdk-net/Examples/aspnetcore/frontend
$ EASEAGENT_CONFIG=`pwd`/agent_frontend.yml dotnet run
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=demo.net.frontend_service.
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.