The descriptor used by every Prometheus Metric
. It is essentially
the immutable meta-data of a metric. The normal metric implementations
included in this package manage their Desc
under the hood.
Descriptors registered with the same registry have to fulfill certain
consistency and uniqueness criteria if they share the same fully-qualified
name: They must have the same help string and the same label names (aka label
dimensions) in each, constLabels and variableLabels, but they must differ in
the values of the constLabels.
Descriptors that share the same fully-qualified names and the same label
values of their constLabels are considered equal.
fq_name has been built from Namespace, Subsystem, and Name.
help provides some helpful information about this metric.
const_label_pairs contains precalculated DTO label pairs based on
the constant labels.
variable_labels contains names of labels for which the metric
maintains variable values.
id is a hash of the values of the ConstLabels and fqName. This
must be unique among all registered descriptors and can therefore be
used as an identifier of the descriptor.
dim_hash is a hash of the label names (preset and variable) and the
Help string. Each Desc with the same fqName must have the same
dimHash.
Initializes a new Desc
. Errors are recorded in the Desc
and will be reported on registration time. variableLabels and constLabels can
be nil if no such labels should be set. fqName and help must not be empty.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static