This project enhances the observability of a poker training microservices platform (checkraise.fr) using OpenTelemetry, Grafana, and its associated stack (Loki, Grafana, Tempo, Prometheus).
It provides a complete view of logs, traces, and metrics across all services to analyze system behavior, detect bottlenecks, and improve reliability.
- Clone the repository:
git clone- Install dependencies for all microservices + frontend:
cd apps/auth-service && npm install
cd ../problems-service && npm install
cd ../lives-service && npm install
cd ../../frontend && npm install- Run the dockers for observability stack and the microservices:
cd infra
docker-compose up -d --build- Run the Next.js frontend locally:
cd ../frontend
npm run dev-
Access the application: Open your browser and navigate to
http://localhost:3001to access the poker training platform. -
Access Grafana dashboard: Open your browser and navigate to
http://localhost:3000to access the Grafana dashboard.- Default credentials:
admin/admin(you will be prompted to change the password on first login)
- Default credentials:
Services:
auth-service→ Handles authentication and JWT managementproblems-service→ Manages poker problem creation and retrievallives-service→ Implements a gamified “lives” system
Frontend: Next.js (runs locally)
Backend: Node.js + Express + Prisma + PostgreSQL
Deployment: Docker Compose for all observability components
apps/ # Microservices
├── auth-service
├── problems-service
└── lives-service
frontend/ # Next.js app (runs locally)
infra/ # Observability and docker setup
├── Grafana/
└── tp1_open...json # Pre-configured Grafana dashboard
├── OpenTelemetry Collector/
├── Loki/
├── Tempo/
├── Prometheus/
└── docker-compose.yml
Each microservice integrates OpenTelemetry through a tracing.ts file.
- Auto-instrumentations: HTTP, Express, Prisma
- Exporters:
- Logs →
OTLPLogExporter → Collector → Loki - Traces →
OTLPTraceExporter → Collector → Tempo - Metrics →
OTLPMetricExporter → Collector → Prometheus
- Logs →
- Correlation: Every log includes
trace_idandspan_idfor cross-navigation in Grafana.
Example Log (JSON structured):
{
"timestamp": "2025-10-25T14:22:33Z",
"level": "info",
"service_name": "auth-service",
"message": "User authenticated successfully",
"trace_id": "af23d8c1f5...",
"span_id": "be09c3..."
}