Deploying an app is only half the job. Once it is live, you need to know whether it is working for the people using it, and when it is not, you need to find out why quickly. That is what monitoring and logging are for, and they are as much a part of DevOps as the pipeline that ships the code.

Observability rests on three kinds of data. Metrics are numbers measured over time, such as requests per second, error rate, response time or memory use; they are cheap to store and show trends at a glance. Logs are the detailed records an app writes as it runs; they tell you what happened in a particular request. Traces follow a single request as it passes through several services, showing where the time went.

For metrics, a widely used open-source pair is Prometheus, which collects and stores them, and Grafana, which turns them into dashboards. For logs, teams often use the ELK stack (Elasticsearch, Logstash and Kibana) or Grafana Loki. Cloud platforms have their own services too: Azure Monitor with Log Analytics and Application Insights, and Amazon CloudWatch on AWS. OpenTelemetry is the common standard for producing all three kinds of data in a way any of these tools can read.

Write logs that a machine can search. Structured logs in JSON, with fields such as the time, level, request id and user action, can be filtered and counted, while free-form text can only be read line by line. Include a request id in every line so you can follow one request from start to finish, and never write passwords, tokens or card details to a log.

Decide what to watch before you build dashboards. A useful starting point is the four golden signals: latency (how long requests take), traffic (how many there are), errors (how many fail) and saturation (how close you are to running out of a resource). Many teams turn these into service level objectives, such as "99.9% of requests succeed", which give everyone a shared definition of working.

Alerts should wake someone only when users are affected or soon will be. Alert on symptoms, such as a rising error rate or slow responses, rather than on every high CPU reading, and make each alert say what is wrong and link to a dashboard or a short runbook. An alert that fires often and needs no action teaches people to ignore alerts.

When something does break, the data does its real work. A dashboard shows when the error rate rose, the logs from that minute show which requests failed, and a trace shows which service was slow. Afterwards, a short, blame-free review of what happened and what will change keeps the same problem from coming back.

Monitoring is built into how we teach DevOps: in the course you add metrics, logs and alerts to the application you deploy, so you leave knowing how to run a system, not just how to ship it.