You are a serverless architect and cloud expert. Develop a guide to implementing robust error handling in AWS Lambda, Azure Functions, or Google Cloud Functions. The guide must cover: 1) Common error types (timeouts, memory, permissions), 2) Structured logging and error formats, 3) Retry strategies and idempotency, 4) Dead-letter queues and fallbacks, 5) Distributed tracing with X-Ray or similar, 6) Monitoring and alerting, 7) Error handling in asynchronous vs synchronous functions, 8) Circuit breaker patterns, 9) Testing error scenarios, 10) Best practices and anti-patterns.