Prometheus::LabelSet
Inherits Enumerable / Struct / Value / Object
LabelSet represents a collection of labels that uniquely identify a metric.
A LabelSet is used to attach multiple labels to a metric, enabling Prometheus's dimensional data model.
labels = LabelSet.new({
"method" => "GET",
"path" => "/api/users",
})
LabelSets can be merged to combine labels from different sources:
base_labels = LabelSet.new({"service" => "web"})
request_labels = LabelSet.new({"method" => "GET"})
combined = base_labels.merge(request_labels)
Constructors
Instance methods
==(other : self)
each(*args, **options)
Sourceeach(*args, **options, &)
Sourcehash(hasher)
See Object#hash(hasher)
labels
Sourcemerge(other : LabelSet)
Source