This Repository contains two micro-services in which tracing agent is integrated. I am using ZipKin, a Open Source tracer for demonstration.
1. GO 1.13+
2. Docker
- Employee Service - This is a demo service performs CRUD operation for employee.
- Auth Service - This service creates and checks Auth for employee service APIs.
In both of the flows employee service interacts with auth service using REST APIs.
docker run -d -p 9411:9411 openzipkin/zipkin
cd auth
go run main.go
cd ..
cd employee
go run main.go
curl --location --request POST 'localhost:8080/employee' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":"<your name>"
}'
{
"id": "<Employee Id>"
}
curl --location --request GET 'localhost:8080/employee?id=<Employee Id>' \
--header 'Authorization: <Employee Id>' \
--header 'Content-Type: application/json'
{
"employee": {
"id": "<Employee Id>",
"name": "your name"
}
}
http://localhost:9411/zipkin