bunch of doc fixes
This commit is contained in:
parent
8085682d49
commit
4b9b1b8bfe
|
@ -322,7 +322,7 @@ impl Inner {
|
|||
/// A Prometheus recorder.
|
||||
///
|
||||
/// This recorder should be composed with other recorders or installed globally via
|
||||
/// [`metrics::set_boxed_recorder`][set_boxed_recorder].
|
||||
/// [`metrics::set_boxed_recorder`].
|
||||
///
|
||||
///
|
||||
pub struct PrometheusRecorder {
|
||||
|
@ -379,8 +379,9 @@ impl PrometheusBuilder {
|
|||
/// By default, the quantiles will be set to: 0.0, 0.5, 0.9, 0.95, 0.99, 0.999, and 1.0. This means
|
||||
/// that all histograms will be exposed as Prometheus summaries.
|
||||
///
|
||||
/// If buckets are set (via [`set_buckets`] or [`set_buckets_for_metric`]) then all histograms will
|
||||
/// be exposed as summaries instead.
|
||||
/// If buckets are set (via [`set_buckets`][Self::set_buckets] or
|
||||
/// [`set_buckets_for_metric`][Self::set_buckets_for_metric]) then all histograms will be exposed
|
||||
/// as summaries instead.
|
||||
pub fn set_quantiles(mut self, quantiles: &[f64]) -> Self {
|
||||
self.quantiles = parse_quantiles(quantiles);
|
||||
self
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//! `proto/event.proto`.
|
||||
//!
|
||||
//! # Usage
|
||||
//! The TCP exporter can be constructed by creating a [`TcpBuilder], configuring it as needed, and
|
||||
//! The TCP exporter can be constructed by creating a [`TcpBuilder`], configuring it as needed, and
|
||||
//! calling [`TcpBuilder::install`] to both spawn the TCP server as well as install the exporter
|
||||
//! globally.
|
||||
//!
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! Layers are composable helpers that can be "layered" on top of an existing `Recorder` to enhancne
|
||||
//! Layers are composable helpers that can be "layered" on top of an existing `Recorder` to enhance
|
||||
//! or alter its behavior as desired, without having to change the recorder implementation itself.
|
||||
//!
|
||||
//! As well, [`Stack`] can be used to easily compose multiple layers together and provides a
|
||||
|
|
|
@ -114,8 +114,8 @@ impl Unit {
|
|||
|
||||
/// Gets the canonical string label for the given unit.
|
||||
///
|
||||
/// For example, the canonical label for Seconds` would be `s`, while for `Nanoseconds, it would
|
||||
/// be `ns`.
|
||||
/// For example, the canonical label for `Seconds` would be `s`, while for `Nanoseconds`,
|
||||
/// it would be `ns`.
|
||||
///
|
||||
/// Not all units have a meaningful display label and so may be empty.
|
||||
pub fn as_canonical_label(&self) -> &str {
|
||||
|
|
|
@ -8,7 +8,7 @@ use alloc::vec::Vec;
|
|||
/// of when an where a metric are emitted.
|
||||
///
|
||||
/// For example, in a web service, you might wish to label metrics with the user ID responsible for
|
||||
/// the request currently being processed, or the request path being processedd. If a codepath
|
||||
/// the request currently being processed, or the request path being processed. If a codepath
|
||||
/// branched internally -- for example, an optimized path and a fallback path -- you may wish to
|
||||
/// add a label that tracks which codepath was taken.
|
||||
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
|
||||
|
|
|
@ -14,14 +14,12 @@
|
|||
//! - [`register_gauge!`] and [`gauge!`] for gauges
|
||||
//! - [`register_histogram!`] and [`histogram!`] for histograms
|
||||
//!
|
||||
//! There is also an [`increment!`] macro, which is shorthand for incrementing a counter by one.
|
||||
//!
|
||||
//! In order to register or emit a metric, you need a way to record these events, which is where
|
||||
//! [`Recorder`] comes into play.
|
||||
//!
|
||||
//! ## Recording
|
||||
//! The [`Recorder`] trait defines the interface between the registration/emission macros, and
|
||||
//! exporters, which is we refer to concrete implementations of [`Recorder`]. The trait defines
|
||||
//! exporters, which is how we refer to concrete implementations of [`Recorder`]. The trait defines
|
||||
//! what the exporters are doing -- recording -- but ultimately exporters are sending data from your
|
||||
//! application to somewhere else: whether it be a third-party service or logging via standard out.
|
||||
//! It's "exporting" the metric data somewhere else besides your application.
|
||||
|
|
Loading…
Reference in New Issue