Ravindra BagaleCourses & study guides मराठी

Ravi Sir's Cards › DevOps

Chapter 14: Logging and Light Observability: Cards

मराठी cards · Open the chapter

Revision cards

Why logs: the flight recorder for the server. Metrics say something broke; only logs say exactly what.
Revision card 1 of 15: Why logs: the flight recorder for the server · Download PNG · Open card page

Lesson: 14.1 Why logs — flight recorder for the server

stdout, stderr and docker logs. Container apps that write to files inside the container lose logs.
Revision card 2 of 15: stdout, stderr and docker logs · Download PNG · Open card page

Lesson: 14.2 stdout/stderr and docker logs

Local OS logs: journald and files. System problems are logged by the OS, not your app.
Revision card 3 of 15: Local OS logs: journald and files · Download PNG · Open card page

Lesson: 14.3 Local OS logs — journald and files

Primary path: CloudWatch Logs. Logging into each server to read logs doesn't scale.
Revision card 4 of 15: Primary path: CloudWatch Logs · Download PNG · Open card page

Lesson: 14.4 Primary path — CloudWatch Logs

Log groups, streams and agents (concept). Without structure you can't find the right logs fast.
Revision card 5 of 15: Log groups, streams and agents (concept) · Download PNG · Open card page

Lesson: 14.5 Log groups, streams and agents (conceptual)

Searching: find the last error. Scrolling thousands of lines misses the important one.
Revision card 6 of 15: Searching: find the last error · Download PNG · Open card page

Lesson: 14.6 Searching — find the last error

Correlation IDs: one paragraph that saves hours. One user request touches many services; logs are scattered.
Revision card 7 of 15: Correlation IDs: one paragraph that saves hours · Download PNG · Open card page

Lesson: 14.7 Correlation IDs — one paragraph that saves hours

Light observability vocabulary. These words fill job posts and interviews.
Revision card 8 of 15: Light observability vocabulary · Download PNG · Open card page

Lesson: 14.8 Light observability vocabulary

Security and hygiene. Logs are read by many people and kept for long; secrets there leak.
Revision card 9 of 15: Security and hygiene · Download PNG · Open card page

Lesson: 14.9 Security and hygiene

Logging anti-patterns. Noisy or vague logs cost money and hide problems.
Revision card 10 of 15: Logging anti-patterns · Download PNG · Open card page

Lesson: 14.10 Anti-patterns

Troubleshooting table. When logs are missing, debugging stops.
Revision card 11 of 15: Troubleshooting table · Download PNG · Open card page

Lesson: 14.11 Troubleshooting table

Retention, cost awareness and lab hygiene. Logs kept forever quietly grow the bill.
Revision card 12 of 15: Retention, cost awareness and lab hygiene · Download PNG · Open card page

Lesson: 14.11b Retention, cost awareness and lab hygiene

From red metric to log line: glue with time. Metrics and logs live in different tools; time joins them.
Revision card 13 of 15: From red metric to log line: glue with time · Download PNG · Open card page

Lesson: 14.11c From red metric to log line (glue with Chapter 13)

Structured logging mini example. Text logs are hard for machines to search reliably.
Revision card 14 of 15: Structured logging mini example · Download PNG · Open card page

Lesson: 14.11d Structured logging mini-example

Lab: generate, query, write the note. Writing the finding down is part of the job.
Revision card 15 of 15: Lab: generate, query, write the note · Download PNG · Open card page

Lesson: 14.12 Lab — generate, query, write the note

Interview cards

Why are logs important? They record what happened, when and why: errors, requests, decisions; needed for debugging and audits.
Interview card 1 of 15: Why are logs important? · Download PNG · Open card page

Lesson: 14.1 Why logs — flight recorder for the server

Where should a containerised app write logs? To stdout/stderr; the runtime collects them and a log agent ships them centrally.
Interview card 2 of 15: Where should a containerised app write logs? · Download PNG · Open card page

Lesson: 14.2 stdout/stderr and docker logs

Where do Linux system logs live? In journald (journalctl) on systemd systems, and in files under /var/log like syslog or auth.log.
Interview card 3 of 15: Where do Linux system logs live? · Download PNG · Open card page

Lesson: 14.3 Local OS logs — journald and files

Why centralise logs? So you can search all servers in one place, keep logs after servers die, and set access and retention.
Interview card 4 of 15: Why centralise logs? · Download PNG · Open card page

Lesson: 14.4 Primary path — CloudWatch Logs

Log group vs log stream? Group: a container for one app/environment with retention and access. Stream: the sequence of events from one source.
Interview card 5 of 15: Log group vs log stream? · Download PNG · Open card page

Lesson: 14.5 Log groups, streams and agents (conceptual)

How do you find the cause in logs quickly? Filter by the incident time window, then ERROR level, then a request id or keyword; read the first error.
Interview card 6 of 15: How do you find the cause in logs quickly? · Download PNG · Open card page

Lesson: 14.6 Searching — find the last error

What is a correlation ID? A unique request id passed between services and logged everywhere, so you can follow one request across systems.
Interview card 7 of 15: What is a correlation ID? · Download PNG · Open card page

Lesson: 14.7 Correlation IDs — one paragraph that saves hours

What are the three pillars of observability? Metrics (what's happening), logs (details of events), traces (where time goes across services).
Interview card 8 of 15: What are the three pillars of observability? · Download PNG · Open card page

Lesson: 14.8 Light observability vocabulary

What should never be logged? Secrets (passwords, tokens, keys), full card numbers, and unneeded personal data.
Interview card 9 of 15: What should never be logged? · Download PNG · Open card page

Lesson: 14.9 Security and hygiene

What makes a useful log message? Timestamp, level, service name, a clear what happened, and ids (request, user, order).
Interview card 10 of 15: What makes a useful log message? · Download PNG · Open card page

Lesson: 14.10 Anti-patterns

Logs stopped arriving centrally. What do you check? Is the agent running, can it read the files (permissions), does it have credentials/network to send, and did the file path change after rotation?
Interview card 11 of 15: Logs stopped arriving centrally. What do you check? · Download PNG · Open card page

Lesson: 14.11 Troubleshooting table

How do you control logging cost? Set retention, reduce noisy logs, sample DEBUG, and archive old logs to cheaper storage.
Interview card 12 of 15: How do you control logging cost? · Download PNG · Open card page

Lesson: 14.11b Retention, cost awareness and lab hygiene

How do you go from an alert to the root cause? Take the alert time, filter the service's logs to that window, find the first error, and confirm it matches the graph.
Interview card 13 of 15: How do you go from an alert to the root cause? · Download PNG · Open card page

Lesson: 14.11c From red metric to log line (glue with Chapter 13)

Why use structured (JSON) logs? Fields like level, request_id and order_id can be filtered and counted exactly, instead of fragile text search.
Interview card 14 of 15: Why use structured (JSON) logs? · Download PNG · Open card page

Lesson: 14.11d Structured logging mini-example

How do you report what you found in logs? Write a short note: what happened, when, evidence (query + lines), cause, and next steps.
Interview card 15 of 15: How do you report what you found in logs? · Download PNG · Open card page

Lesson: 14.12 Lab — generate, query, write the note

Comparison cards

Plain-text logs vs structured (JSON) logs. Plain text: a sentence per line, written for humans.Structured: each line has named fields, usually JSON, written for machines and humans.
Comparison card 1 of 3: Plain-text logs vs structured (JSON) logs · Download PNG · Open card page

Lesson: 14.11d Structured logging mini-example

Logging to stdout vs to a file. stdout: the program's standard output stream.File: the program writes lines into a log file on disk.
Comparison card 2 of 3: Logging to stdout vs to a file · Download PNG · Open card page

Lesson: 14.2 stdout/stderr and docker logs

Logs vs traces. Logs: records of single events in one service.Traces: the full path of one request across services, with time spent in each step.
Comparison card 3 of 3: Logs vs traces · Download PNG · Open card page

Lesson: 14.8 Light observability vocabulary