Skip to content

khpcoding/Distributed-Tracing-with-Jaeger-and-Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Distributed Tracing with Jaeger and OpenTracing

This project demonstrates distributed tracing in a microservices architecture using Jaeger and OpenTracing. It consists of three services (Service A, Service B, and Service C) that communicate with each other, and traces are collected and visualized using Jaeger.

Table of Contents

  1. Project Overview
  2. Technologies Used
  3. Prerequisites
  4. Setup and Installation
  5. Running the Project
  6. Viewing Traces in Jaeger UI
  7. Project Structure

Project Overview

This project simulates a microservices environment where:

  • Service A calls Service B.
  • Service B calls Service C.
  • Each service is instrumented with OpenTracing to generate traces.
  • Traces are collected and visualized using Jaeger.

The project also includes a Docker Compose setup to run Jaeger, Elasticsearch, and Kibana for trace storage and visualization.

1_arc


Technologies Used

  • Go (Golang) for building microservices.
  • OpenTracing for distributed tracing.
  • Jaeger for trace collection and visualization.
  • Docker Compose for container orchestration.
  • Elasticsearch for trace storage.
  • Kibana for log visualization (optional).

Prerequisites

Before running the project, ensure you have the following installed:

  1. Docker and Docker Compose:

  2. Go (optional, if you want to run the services locally without Docker):


Setup and Installation

  1. Clone the repository:
    git clone https://github.com/khpcoding/Distributed-Tracing-with-Jaeger-and-Go.git
    cd Distributed-Tracing-with-Jaeger-and-Go

This will start the following services:


Running the Project

Once the services are up and running, you can interact with them as follows:

1- Service A is available at http://localhost:8080/service-a.

2- Service B is available at http://localhost:8081/service-b.

3- Service C is available at http://localhost:8082/service-c.

To trigger a trace, simply make a request to Service A:

curl http://localhost:8080/service-a

This will initiate a chain of requests:

Service A → Service B → Service C.


Viewing Traces in Jaeger UI

1- Open the Jaeger UI in your browser:

http://localhost:16686

2- Search for traces by selecting the service name (serviceA, serviceB, or serviceC) and clicking Find Traces.

3- You can visualize the entire request flow, including the time taken by each service and the relationships between them.

image

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages