How hikana/lsa-demo works
This is a Prometheus teaching lab built around a Flask course-enrollment service. A student submits a course request; the service checks enrollment rules, updates in-memory capacity state, and returns a result. A separate load generator can exercise that endpoint. The repository also includes Prometheus/Grafana monitoring and an OpenTelemetry demo configuration. The app’s Prometheus counter and metrics endpoint are still TODOs, and monitoring wiring is represented only by repository structure, not inspected configuration; those links are therefore dashed and unverified.
Main entry points: app.py Course enrollment · prometheus.yml Prometheus · otel-collector.yaml OTel collector · loadgen.py Load generator
Components 11
Enrollment service
- Course enrollment
app/app.py - Course capacity state
app/app.py - Prerequisite rules
app/enroll_rules.py
Traffic generation
- Load generator
loadgen/loadgen.py
Metrics and dashboards
- Prometheus
prometheus/prometheus.yml - Node exporter
node-exporter/compose.yaml - Grafana dashboards
grafana/dashboards/course.json
Tracing demo
- Trace instrumentation
app/enroll_rules.py - OTel collector
demo/o11y/otel-collector.yaml - Tempo
demo/o11y/tempo.yaml
Other components
- Student
Connections 9
- Student → Course enrollment: submits enrollment
README.md - Course enrollment → Prerequisite rules: checks prerequisites
app/app.py - Course enrollment → Course capacity state: updates capacity
app/app.py - Load generator → Course enrollment: posts requests
loadgen/loadgen.py - Course enrollment → Prometheus: exposes metrics
- Prometheus → Node exporter: scrapes metrics
- Grafana dashboards → Prometheus: queries metrics
- Trace instrumentation → OTel collector: exports traces
- OTel collector → Tempo: sends traces