class

Prometheus::Label

Inherits Reference / Object

A Label represents a key-value pair used to identify a metric.

Labels are used to distinguish different dimensions of a metric. For example, an HTTP request counter might have labels for the method and path.

label = Label.new("method", "GET")

Label names must match the regex [a-zA-Z_][a-zA-Z0-9_]* and cannot be empty. Label values cannot be empty.

Constructors

new(name : String, value : String)
Source

Instance methods

name
Source
value
Source