Struct substrate_prometheus_endpoint::HistogramOpts [−][src]
Expand description
A struct that bundles the options for creating a Histogram metric. It is
mandatory to set Name and Help to a non-empty string. All other fields are
optional and can safely be left at their zero value.
Fields
common_opts: OptsA container holding various options.
buckets: Vec<f64, Global>Defines the buckets into which observations are counted. Each element in the slice is the upper inclusive bound of a bucket. The values must be sorted in strictly increasing order. There is no need to add a highest bucket with +Inf bound, it will be added implicitly. The default value is DefBuckets.
Implementations
Create a HistogramOpts with the name and help arguments.
namespace sets the namespace.
subsystem sets the sub system.
pub fn const_labels(
self,
const_labels: HashMap<String, String, RandomState>
) -> HistogramOpts
pub fn const_labels(
self,
const_labels: HashMap<String, String, RandomState>
) -> HistogramOpts
const_labels sets the const labels.
pub fn const_label<S1, S2>(self, name: S1, value: S2) -> HistogramOpts where
S1: Into<String>,
S2: Into<String>,
pub fn const_label<S1, S2>(self, name: S1, value: S2) -> HistogramOpts where
S1: Into<String>,
S2: Into<String>,
const_label adds a const label.
variable_labels sets the variable labels.
variable_label adds a variable label.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for HistogramOpts
impl Send for HistogramOpts
impl Sync for HistogramOpts
impl Unpin for HistogramOpts
impl UnwindSafe for HistogramOpts
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more