Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rosspatil/distributed-tracing
This repository demonstrates a full-fledged example of distributed tracing in a micro-service architecture.
https://github.com/rosspatil/distributed-tracing
distributed-systems distributed-tracing golang golang-application golang-examples microservices observability opencensus opencensus-propagation tracing tracing-collector tracing-library zipkin
Last synced: about 1 month ago
JSON representation
This repository demonstrates a full-fledged example of distributed tracing in a micro-service architecture.
- Host: GitHub
- URL: https://github.com/rosspatil/distributed-tracing
- Owner: rosspatil
- License: apache-2.0
- Created: 2020-08-22T07:43:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-22T18:02:51.000Z (over 4 years ago)
- Last Synced: 2024-06-20T06:27:26.942Z (6 months ago)
- Topics: distributed-systems, distributed-tracing, golang, golang-application, golang-examples, microservices, observability, opencensus, opencensus-propagation, tracing, tracing-collector, tracing-library, zipkin
- Language: Go
- Homepage:
- Size: 303 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A full flegde example for Distributed Tracing
This Repository contains two micro-services in which tracing agent is integrated.
I am using ZipKin, a Open Source tracer for demonstration.## Prerequisites
1. GO 1.13+
2. Docker## Services -
1. Employee Service - This is a demo service performs CRUD operation for employee.
2. Auth Service - This service creates and checks Auth for employee service APIs.## Employee flows
In both of the flows employee service interacts with auth service using REST APIs.
## Demo
## Perform below actions to run this demo -
docker run -d -p 9411:9411 openzipkin/zipkin
cd auth
go run main.go
cd ..
cd employee
go run main.go## Blow are the cURL to perform employee action
### 1. Employee Registration
#### Request -
curl --location --request POST 'localhost:8080/employee' \
--header 'Content-Type: application/json' \
--data-raw '{
"name":""
}'#### Response -
{
"id": ""
}
### 2. Get Employee details
#### Request -
curl --location --request GET 'localhost:8080/employee?id=' \
--header 'Authorization: ' \
--header 'Content-Type: application/json'#### Response -
{
"employee": {
"id": "",
"name": "your name"
}
}### 3. Open ZipKin dashboard using below URL to see trace generated
http://localhost:9411/zipkin