favetelinguis (18) [Avatar] Offline
In the metrics section you had a very nice explanation on how to extract metrics from your logs and send them to Cloudwatch metrics. What is the the upside of going with this approach instead of just sedning the metrics on to for example Kibana and use Kibana as your metrics tool?
Yan Cui (71) [Avatar] Offline
As I mentioned in that unit, the reason for doing this is to avoid the extra latency introduced by sending metrics data to whatever monitoring system you use - especially as these latency overhead can compound when a single user action requires a chain of API calls in your microservices architecture.

You can absolutely apply the same approach and send metrics to a splunk or honeycomb or whatever external tool you want to use, the key point there is to do it outside of the function's invocation time.

As I mentioned in that unit, this is not necessary with async workflows - e.g. functions that process Kinesis events, or SNS messages. But for APIs where the latency is user-facing, it's something to consider if you want to minimise the user facing latency.

Another constraint we have for the course, and one of the main reason why we mainly used AWS services is to limit the number of tools we have to teach you. Logz.io was the main exception because it has a free tier, whereas you'd end up paying for Amazon Elasticsearch if we use that instead.