InterviewStack.io LogoInterviewStack.io

Error Handling and Logging Questions

Covers systematic error management and observability practices for applications and services. Includes structured logging, error categorization and severity, returning appropriate error responses and HTTP status codes, try catch usage, graceful degradation and fallback strategies, retry logic and exponential backoff, circuit breaker patterns for external dependency failures, monitoring and alerting, and using logs and traces for debugging production issues. Emphasizes designing systems that surface actionable diagnostics while protecting user experience and system stability.

EasyTechnical
28 practiced
Describe the typical logging levels (debug, info, warn, error, critical/fatal). For each level, provide examples of events that should be logged at that level in a production microservice, and explain how an SRE team should map these levels to alerting and on-call priorities.
MediumTechnical
21 practiced
Write a pytest unit test (high-level pseudocode is fine) asserting that a web endpoint returns HTTP 422 for validation errors and that an error log line includes the tag "validation_failure" and the request_id. Describe how you'd structure the test setup and assertions.
EasyTechnical
19 practiced
What is a stack trace and when should an SRE team include or avoid including stack traces in logs or in API responses? Discuss privacy/security risks and how to sanitize or redact stack traces while maintaining usefulness for debugging.
HardSystem Design
22 practiced
Design a centralized logging system that can consistently ingest 1,000,000 structured log events per second, provide real-time alerting, and support hot retention of 30 days with searchable indices. Address ingestion architecture, buffering, sharding, indexing strategy, hot vs cold storage, cost-control techniques, and security/isolation between tenants.
HardTechnical
23 practiced
Design a distributed retry architecture for a chain of microservices where clients and intermediate services may retry requests. Ensure deduplication and idempotency of side effects using idempotency keys, outbox patterns, and request fingerprints. Discuss storage, key expiry, race conditions, and monitoring.

Unlock Full Question Bank

Get access to hundreds of Error Handling and Logging interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.