metrics_cloudwatch

crates.io Docs

Purpose

Provide a backend for the metrics facade crate, pushing metrics to CloudWatch.

How to use

Credentials for AWS needs to be available in the environment, see Rusoto docs on AWS credentials

bash cargo add -s metrics metrics_cloudwatch

```rust fn main() { // Initialize the backend metricscloudwatch::builder() .cloudwatchnamespace("my-namespace") .init_thread() .unwrap();

metrics::counter!("requests", 1);

} ```