Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest update of metrics_cloudwatch silently failing #42

Open
harshkpatel2002 opened this issue Jul 19, 2023 · 1 comment
Open

Latest update of metrics_cloudwatch silently failing #42

harshkpatel2002 opened this issue Jul 19, 2023 · 1 comment

Comments

@harshkpatel2002
Copy link

harshkpatel2002 commented Jul 19, 2023

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);
}
@VladimirBramstedt
Copy link
Contributor

firstly, does it work if you specify a region explicitly? ( a region must be set, but aws_sdk has no defaulting, meaning that if you dont have a region provider either in your aws config or via some other method, it will fail.
secondly, to test that claim, run your test program with log/tracing enabled for the aws sdk crate and see what it outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants