Skip to content

Latest update of metrics_cloudwatch silently failing #42

@harshkpatel2002

Description

@harshkpatel2002

It seems that in the latest update (2.0.0), metrics are no longer emitting to cloudwatch. As well the current "How to use" is no longer functional and outdated.

fn main() {
    let metrics_builder = metrics_cloudwatch::Builder::new();
    metrics_builder =
        metrics_cloudwatch::Builder::cloudwatch_namespace(metrics_builder, "namespace");
    init_thread(metrics_builder, metrics::set_boxed_recorder).unwrap();

    metrics::counter!("ErrorCount", 1);
}

Whereas in this previous iteration the following will work:

metrics = "0.16"
metrics_cloudwatch = "0.15.0"
fn main() {
    metrics_cloudwatch::builder(metrics_cloudwatch::Region::default())
        .cloudwatch_namespace("namespace")
        .init_thread(metrics::set_boxed_recorder)
        .unwrap();

    metrics::counter!("ErrorCount", 1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions