How abirbh1/order_tracker works
Order Tracker lets users create, list, update, and look up orders through a web page and API backed by SQLite. Its observability flow exports application telemetry to a collector and configured backends; Grafana dashboards and alerts expose failures. Firing alerts are handled by a separate incident-response service, which gathers metrics, logs, and traces before optionally launching a coding assistant. The main runtime and incident-response code were excerpted; backend wiring and alert behavior are included where the README documents them.
Main entry points: main.py Order API · otel-collector.yaml OTel Collector · context.py Context collection · prometheus.yaml Prometheus
Components 15
Order tracking
- Order page
static/index.html - Order API
app/main.py - SQLite orders
app/main.py
Telemetry pipeline
- Telemetry setup
app/telemetry.py - OTel Collector
observability/otel-collector.yaml
Incident response
- Alert receiver
incident-response/incident_response/app.py - Context collection
incident-response/incident_response/context.py - Coding assistant
incident-response/incident_response/assistant.py
Observability backends
- Prometheus
observability/prometheus.yaml - Loki
observability/loki.yaml - Tempo
observability/tempo.yaml - Grafana dashboard
observability/grafana/dashboards/order-tracker.json - Lookup alert
observability/grafana/provisioning/alerting/order-tracker-alerts.yaml
Other components
- Order user
- Claude Code
Connections 21
- Order user → Order page: opens
README.md - Order user → Order API: uses API
README.md - Order page → Order API: requests
- Order API → SQLite orders: reads and writes
app/main.py - Order API → Order page: serves
app/main.py - Order API → Telemetry setup: configures
app/main.py - Order API → OTel Collector: exports telemetry
README.md - OTel Collector → Prometheus: forwards metrics
README.md - OTel Collector → Loki: forwards logs
README.md - OTel Collector → Tempo: forwards traces
README.md - Prometheus → Grafana dashboard: provides data
README.md - Loki → Grafana dashboard: provides data
README.md - Tempo → Grafana dashboard: provides data
README.md - Prometheus → Lookup alert: evaluates
README.md - Lookup alert → Alert receiver: sends firing alerts
README.md - Alert receiver → Context collection: collects context
incident-response/incident_response/app.py - Alert receiver → Coding assistant: starts assistant
incident-response/incident_response/app.py - Context collection → Prometheus: queries metrics
incident-response/incident_response/context.py - Context collection → Loki: queries logs
incident-response/incident_response/context.py - Context collection → Tempo: searches traces
incident-response/incident_response/context.py - Coding assistant → Claude Code: launches process
incident-response/incident_response/assistant.py