Interview Q&A · questions with model answers

Logging & Observability Interview Questions

Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE) · Cloud Engineer · Backend Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. How should log levels be used?

    Use ERROR for failures that need attention, WARN for unexpected but handled situations, INFO for important business and lifecycle events, and DEBUG/TRACE for detailed diagnostics that are usually…

  2. How is audit logging different from application logging?

    Audit logs are business/security records of who did what, to which resource, when and from where, kept immutable and retained according to compliance needs; application logs are operational…

  3. Can logging hurt application performance? How do you mitigate it?

    Yes: synchronous I/O, expensive message formatting, huge payloads and high volume can add latency and CPU. Mitigate with asynchronous/buffered loggers, lazy formatting, level checks, sampling of…

  4. How does chaos engineering relate to observability?

    Chaos engineering deliberately injects failures (killing instances, adding latency, failing dependencies) to verify resilience; good observability is a prerequisite because you need to see and…

  5. Explain the Prometheus metric types: counter, gauge, histogram, summary.

    A counter only increases (requests_total); a gauge goes up and down (queue_depth, memory); a histogram counts observations in buckets (request duration) so percentiles can be computed and aggregated…

  6. How do log rotation and retention work for services that write log files?

    Rotation (logrotate, appender policies) closes and archives log files by size or time and deletes old ones, preventing disks from filling; retention defines how long logs are kept before deletion or…

Was this page helpful?

Report a mistake