Trait glean_core::traits::DualLabeledCounter
source · pub trait DualLabeledCounter {
// Required methods
fn get(&self, key: &str, category: &str) -> CounterMetric;
fn test_get_num_recorded_errors(&self, error: ErrorType) -> i32;
}
Expand description
A description for the DualLabeledCounterMetric
type.
When changing this trait, make sure all the operations are
implemented in the related type in ../metrics/
.
Required Methods§
sourcefn get(&self, key: &str, category: &str) -> CounterMetric
fn get(&self, key: &str, category: &str) -> CounterMetric
Gets a specific counter for a given key/category pair.
If a set of acceptable keys or categorires were specified in the metrics.yaml
file,
and the given label is not in the set, it will be recorded under the special OTHER_LABEL
label.
If a set of acceptable keys and/or categories was not specified in the metrics.yaml
file,
only the first 16 unique labels will be used.
After that, any additional labels will be recorded under the special OTHER_LABEL
label.
Labels must have a maximum of 111 characters, and may comprise any printable ASCII characters.
If an invalid label is used, the metric will be recorded in the special OTHER_LABEL
label.