ASP.NET Core Web API Interview Question #198
What observability should a senior developer add to a production API?
Senior API Design, Architecture, Scalability & Production Scenarios Senior Advanced
Quick Interview Answer
Use structured logs, metrics, and distributed traces together. Track request rate, latency percentiles, errors, saturation, database and external dependency duration, retry/circuit-breaker activity, queue depth, cache effectiveness, and business-critical outcomes.
Detailed Explanation
Use structured logs, metrics, and distributed traces together. Track request rate, latency percentiles, errors, saturation, database and external dependency duration, retry/circuit-breaker activity, queue depth, cache effectiveness, and business-critical outcomes.
Propagate trace context across service calls and include deployment/version metadata. Alerts should focus on user-impacting symptoms and actionable conditions rather than every individual log entry.
Code Example
// Typical dimensions:
// service.name
// deployment.version
// route
// status_code
// duration
// trace_id
// dependency.name
// tenant/client category when safe