opinionated_metrics

Crates.ioopinionated_metrics
lib.rsopinionated_metrics
version0.2.0
sourcesrc
created_at2022-02-16 20:18:24.062818
updated_at2022-10-26 13:45:50.922827
descriptionAutomatic configuration of exporters for `metrics`
homepagehttps://github.com/faradayio/geocode-csv/tree/main/crates/opinionated_metrics
repositoryhttps://github.com/faradayio/geocode-csv
max_upload_size
id533526
size9,838
Eric Kidd (emk)

documentation

https://docs.rs/opinionated_metrics

README

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.

Commit count: 130

cargo fmt