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

How to find that metrics sending failed? #742

Open
PatrikBak opened this issue Aug 21, 2022 · 0 comments
Open

How to find that metrics sending failed? #742

PatrikBak opened this issue Aug 21, 2022 · 0 comments

Comments

@PatrikBak
Copy link

I would like to Log that metrics sending failed. How do I do it, please?

var metrics = new MetricsBuilder()
    .Report.ToStatsDUdp(
        options =>
        {
            options.SocketSettings.Address = "localhost";
            options.SocketSettings.Port = 42;
        })
    .Build();

for (var i = 0; i < 5; i++)
{
    var counter = new CounterOptions { Name = "my_counter" };
    metrics.Measure.Counter.Increment(counter);
}
Task.WaitAll(metrics.ReportRunner.RunAllAsync().ToArray());
@PatrikBak PatrikBak changed the title Exception handling How to find that metrics sending failed? Aug 21, 2022
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

1 participant