https://github.com/ilyass-bougati/spring-grafana
🛠️ Full observability pipeline for a Spring Boot microservices app using the LGTM stack (Loki, Grafana, Tempo, Prometheus). Features centralized logging, metrics, distributed tracing, and trace-to-metrics — all containerized with Docker Compose.
https://github.com/ilyass-bougati/spring-grafana
distributed-tracing grafana lgtm-stack loki monitoring prometheus spring-boot tempo tracing
Last synced: about 1 month ago
JSON representation
🛠️ Full observability pipeline for a Spring Boot microservices app using the LGTM stack (Loki, Grafana, Tempo, Prometheus). Features centralized logging, metrics, distributed tracing, and trace-to-metrics — all containerized with Docker Compose.
- Host: GitHub
- URL: https://github.com/ilyass-bougati/spring-grafana
- Owner: Ilyass-Bougati
- Created: 2025-06-13T16:39:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-20T22:06:44.000Z (12 months ago)
- Last Synced: 2025-06-20T23:21:53.561Z (12 months ago)
- Topics: distributed-tracing, grafana, lgtm-stack, loki, monitoring, prometheus, spring-boot, tempo, tracing
- Language: Java
- Homepage:
- Size: 2.09 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Distributed Observability
Observability is the ability to measure the internal state of a system only by its external outputs.
For a distributed system like microservices, these external outputs are basically known as telemetry data. It includes information like the resource consumption of a machine, the logs generated by the applications running on a machine, and several others.
In this project I'm using [Grafana](https://grafana.com/), [Loki](https://grafana.com/oss/loki/), [Prometheus](https://prometheus.io/), [Zipkin](https://zipkin.io/) and [Spring boot](https://spring.io/projects/spring-boot)

The whole Collection and visualization layer is put together through [Docker compose](https://docs.docker.com/compose/), and can be ran with a simple command
```bash
docker compose up
```
Then the Grafana interface will be accessible from `http://localhost:3000/`. For the services, each one should be run individually, by first entering the `services` directory and running the PostgreSQL docker container using the `docker compose up` command. Then, for each of the two services, we just enter the directory of the service and run the command
```bash
./mvnw spring-boot:run
```
# The project so far
Note that I still can't access the Zipkin data from Grafana. And that I only have one service so far in the project
## The metrics
The metrics data is collected into a Prometheus database, then read by Grafana, where we can create dashboards from it

## The logs
For the logs we're using Grafana Loki, we collect them in a Loki instance, then visualize them using Grafana

## The traces
We're using Tempo as a traces collector
