Categorygithub.com/NamanJain8/distributed-tracing-golang-sample
repository
0.0.0-20220527192352-97492a23e287
Repository: https://github.com/namanjain8/distributed-tracing-golang-sample.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Distributed Tracing Golang Sample

This project demonstrates how to instrument distrubted tracing in golang application with the help of below microservices:

  • order-service
  • payment-service
  • user-service

For this you would need the following:

Tracing flow

Distributed tracing

Running the code

Start the signoz server following the instructions:

git clone -b main https://github.com/SigNoz/signoz.git
cd signoz/deploy/
./install.sh

Configuration for microservices can be updated in .env file

# service config
USER_URL=localhost:8080
PAYMENT_URL=localhost:8081
ORDER_URL=localhost:8082

# database config
SQL_USER=root
SQL_PASSWORD=password
SQL_HOST=localhost:3306
SQL_DB=signoz

# telemetry config
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
INSECURE_MODE=true

Start individual microservices using below commands

  1. User Service
go run ./users
  1. Payment Service
go run ./payment
  1. Order Service
go run ./order

Start the frontend using following command. For installation of serve see: https://www.npmjs.com/package/serve

serve -l 5000 frontend

View traces and metrics at http://localhost:3301/