2 unstable releases

0.2.0 Oct 26, 2022
0.1.0 Feb 16, 2022

#661 in Configuration

Download history 44/week @ 2024-04-01 8/week @ 2024-04-22 29/week @ 2024-04-29 14/week @ 2024-05-13 5/week @ 2024-05-20 31/week @ 2024-05-27 10/week @ 2024-06-03 13/week @ 2024-06-10 7/week @ 2024-06-17 10/week @ 2024-06-24 4/week @ 2024-07-01 22/week @ 2024-07-08 18/week @ 2024-07-15

54 downloads per month
Used in geocode-csv

Apache-2.0 OR MIT

31KB
455 lines

opinionated_metrics: Automatically configure metrics exporters

The goal: This library should provide reasonable defaults for collecting and exporting data from the Rust metrics facade.

// Set up metrics reporting for a CLI tool, using environment variables.
let metrics_handle = opinionated_metrics::initialize_cli()?;

// Do stuff.

// Send a metrics report when the CLI tool has finished running.
metrics_handle.report().await?;

The reality: Right now, this works for CLI programs and it exports metrics to NewRelic and/or the logs. And we would honestly recommend against reporting to NewRelic unless you're already invested in it. (Hey, nobody ever promised this libraries opinions were good.) We do want to add Prometheus support, and better support for servers (and not just CLI programs that run and exit).

Current users: This library is intended for immediate production use at Faraday.

For more details, see the API documentation.

Dependencies

~9–22MB
~347K SLoC