metrics: update docs for facade usage
This commit is contained in:
parent
8cb8a8cf93
commit
35b4db8cbf
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "metrics"
|
||||
version = "0.10.0"
|
||||
version = "0.10.1"
|
||||
authors = ["Toby Lawrence <toby@nuclearfurnace.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in New Issue