metrics: update docs for facade usage

This commit is contained in:
Toby Lawrence 2019-06-11 21:38:05 -04:00
parent 8cb8a8cf93
commit 35b4db8cbf
No known key found for this signature in database
GPG Key ID: 3BB201B0EEE9212E
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "metrics"
version = "0.10.0"
version = "0.10.1"
authors = ["Toby Lawrence <toby@nuclearfurnace.com>"]
edition = "2018"

View File

@ -163,6 +163,23 @@
//! Most exporters have the ability to run on the current thread or to be converted into a future
//! which can be spawned on any Tokio-compatible runtime.
//!
//! # Facade
//!
//! `metrics` is `metrics-facade` compatible, and can be installed as the global metrics facade:
//! ```
//! # extern crate metrics;
//! #[macro_use]
//! extern crate metrics_facade;
//! use metrics::Receiver;
//!
//! Receiver::builder()
//! .build()
//! .expect("failed to create receiver")
//! .install();
//!
//! counter!("items_processed", 42);
//! ```
//!
//! [metrics_core]: https://docs.rs/metrics-core
//! [`Recorder`]: https://docs.rs/metrics-core/0.3.1/metrics_core/trait.Recorder.html
#![deny(missing_docs)]