Final Project: Instrument a Sample App with Logs, Metrics, and Traces
Apply all three pillars to a real, running application, however small.
Requirements
- Add structured (JSON) logging to your app, including at least one correlation ID that's attached to every log line generated while handling a single request.
- Expose at least three Prometheus-style metrics: one counter (e.g. total requests), one gauge (e.g. active connections), and one histogram (e.g. request latency), on a scrapeable endpoint.
- Add basic distributed tracing (using OpenTelemetry or a similar library) around at least one operation that calls another service or the database, with the trace context propagated if your app has more than one service.
- Build a simple dashboard (even a basic Grafana/hosted-tool dashboard, or a written mockup with real numbers) showing the four golden signals for your app.
- Define at least one SLO for your app (e.g. "99% of requests complete in under 500ms") and describe what alert you'd configure to catch a violation of it.
Stretch goals
- Deliberately introduce a bug, then use only your logs/metrics/traces (not the source code) to diagnose it, and write up how you found it.
- Add a second alert rule based on error rate, and explain why it's a symptom-based alert rather than a cause-based one.
- Correlate a single request end-to-end: capture its correlation ID, find its trace, and find its logs, all for the exact same request.
Submit a link to your finished project (a repo, or a written report with dashboard screenshots/mock numbers) below, an instructor will review it before you can mark this lesson complete. Good luck! 🚀