Posted On: Jun 4, 2021

CloudWatch Embedded Metric Format enables you to ingest complex high-cardinality application data in the form of logs and easily generate actionable metrics from them. It has traditionally been hard to generate actionable custom metrics from your ephemeral resources such as Lambda functions, and containers. By sending your logs in the Embedded Metric Format, you can now easily create custom metrics without having to instrument or maintain separate code, while gaining powerful analytical capabilities on your log data.

There are several benefits to using Embedded Metric Format. You can embed custom metrics alongside detailed log event data, and CloudWatch will automatically extract the custom metrics so you can visualize and alarm on them, for real-time incident detection. Additionally, the detailed log events associated with the extracted metrics can be queried using CloudWatch Logs Insights to provide deep insights into the root causes of operational events.

You can generate log events in the Embedded Metric Format using the open-sourced client libraries available on GitHub or manually construct them conforming to a defined specification. These open-sourced client libraries now include C#, as well as Java, Node.js and Python. Once generated, these events are sent to CloudWatch using the client libraries, the CloudWatch Agent or by directly calling the PutLogEvents API.