Expand description
Low-cardinality label for errors, useful for metrics and logging.
ErrorLabel holds a low-cardinality string value intended for use as a metric tag
or structured log field. Values should always be chosen from a small, bounded set.
§Quick Start
use error_label::ErrorLabel;
// From a static string
let label: ErrorLabel = "timeout".into();
assert_eq!(label, "timeout");
// Dotted chain from parts
let label = ErrorLabel::from_parts(["http", "client", "timeout"]);
assert_eq!(label, "http.client.timeout");Structs§
- Error
Label - A low-cardinality label for an error, useful for metrics and logging.