You need to sample debug logs in #production
▻https://hackernoon.com/you-need-to-sample-debug-logs-in-production-171d44087749?source=rss----3
It’s common practice to set log level to WARNING for production due to traffic volume. This is because we have to consider various cost factors:cost of logging : CloudWatch Logs charges $0.50 per GB ingested. In my experience, this is often much higher than the Lambda invocation costscost of storage : CloudWatch Logs charges $0.03 per GB per month, and its default retention policy is Never Expire! A common practice is to ship your logs to another log aggregation service and to set the retention policy to X days. See this post for more details.cost of processing : if you’re processing the logs with Lambda, then you also have to factor in the cost of Lambda invocations.But, doing so leaves us without ANY debug logs in production. When a problem happens in production, you (...)