# class Prometheus::Label

- Prometheus::Label
- Reference
- Object

##
Overview

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.

##
Defined in:

types.cr

##
Constructors

- .new(name : String, value : String)

##
Instance Method Summary

- #name : String
- #value : String

##
Constructor Detail

def self.new(name : String, value : String) #

##
Instance Method Detail

def name : String #
def value : String #