Day 20: Recap – Creating a Basic Observability Stack
Alex Parra
AWS Community Builder | Platform Engineer | Kubernetes | Gitops | DEVOPS | SRE
Welcome to Day 20 of the Zero to Platform Engineer in 30 Days challenge! ?? Today, we’re doing a recap of observability best practices and assembling a basic observability stack using Prometheus, Grafana, Loki, and OpenTelemetry.
What Is an Observability Stack?
An observability stack consists of tools that help monitor, log, and trace applications to ensure performance and reliability.
Key Components of Observability:
A full observability stack includes:
Building a Cloud-Native Observability Stack
Metrics and Prometheus
1. Install Prometheus with Helm:
helm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring --create-namespace
2. Example PromQL Queries:
sum(rate(container_cpu_usage_seconds_total[5m])) by (pod)
Dashboards and Grafana
Install Grafana with Helm:
领英推荐
helm install grafana grafana/grafana --namespace monitoring
Import a Pre-Built Dashboard:
Logs with Loki
Install Loki with Helm:
helm install loki grafana/loki-stack --namespace monitoring
Query logs in Grafana:
{job="nginx"} |= "error"
Distributed Tracing with OpenTelemetry
Install OpenTelemetry with Helm:
helm install otel-collector open-telemetry/opentelemetry-collector --namespace monitoring
Why Use an Observability Stack?
Activity for Today
What’s Next?
Tomorrow, we’ll shift focus to Internal Developer Platforms (IDPs) and discuss how platform teams improve developer experience.