Skip to content

About

LGTM stack (Loki, Grafana, Tempo, Mimir) with OpenTelemetry on Kubernetes (Kind)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LGTM Stack on Kubernetes with OpenTelemetry

A complete observability platform running on Kind (Kubernetes in Docker) featuring the modern LGTM Stack (Loki, Grafana, Tempo, Mimir) with OpenTelemetry instrumentation and Grafana Alloy telemetry collector.

🎯 Project Overview

This project demonstrates a production-ready observability stack with:

  • Multi-service architecture (Flask frontend → Flask backend → SQLite database)
  • Complete telemetry collection (traces, metrics, logs)
  • Distributed tracing across service boundaries
  • Log-to-trace correlation
  • Pre-built Grafana dashboards

📚 Documentation

🚀 Quick Start

# 1. Create Kind cluster with port mappings
.\scripts\setup-cluster.ps1

# 2. Build both application images
.\scripts\build-app.ps1

# 3. Deploy entire LGTM stack + applications
.\scripts\deploy.ps1

# 4. Generate test traffic
.\scripts\generate-traffic.ps1

# 5. Access Grafana
# Open http://localhost:3000 (admin/admin)

See GETTING-STARTED.md for detailed instructions.

🎯 What You Get

  • Flask Frontend (2 replicas) → Flask Backend (1 replica) → SQLite database
  • Grafana Alloy - OTLP receiver collecting all telemetry
  • Loki - Log aggregation with full-text search
  • Tempo - Distributed tracing with TraceQL
  • Mimir - Prometheus-compatible metrics storage
  • Grafana - Unified visualization platform
  • Pre-built dashboards - Overview + Performance Monitoring (11 panels)
  • Log-to-trace correlation - Click from logs to traces and back

📊 Access Services

Service URL Credentials
Grafana http://localhost:3000 admin/admin
Flask Frontend http://localhost:8080 -
Loki API http://localhost:3100 -

🧪 Testing

# Light traffic (10 requests)
.\scripts\generate-traffic.ps1

# Heavy load (10,000 requests with 20 parallel jobs)
.\scripts\generate-heavy-load.ps1

# Test all endpoints
.\scripts\test-app.ps1

🧹 Cleanup

# Delete deployments only (keep cluster)
.\scripts\cleanup.ps1

# Delete everything including Kind cluster
.\scripts\cleanup.ps1 -DeleteCluster

📁 Key Files

monitoring/
├── app/                           # Flask frontend
├── app-backend/                   # Flask backend with SQLite
├── grafana/dashboards/            # Pre-built dashboards (2)
├── k8s/base/                      # Kubernetes manifests
│   ├── 00-namespace.yaml
│   ├── 01-loki.yaml
│   ├── 02-tempo.yaml
│   ├── 03-mimir.yaml
│   ├── 04-alloy.yaml
│   ├── 05-grafana.yaml
│   ├── 06-flask-frontend.yaml
│   └── 07-flask-backend.yaml
├── scripts/                       # PowerShell automation
├── GETTING-STARTED.md            # Complete setup guide
├── ARCHITECTURE.md               # System design reference
└── DEVELOPMENT.md                # Development workflows

� Learn More

📚 External Resources


About

LGTM stack (Loki, Grafana, Tempo, Mimir) with OpenTelemetry on Kubernetes (Kind)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages