Prometheus::Metric
Base class for all metric types (Counter, Gauge, Histogram, Summary).
This abstract class defines the common interface and behavior for all metrics:
- Each metric has a name, help text, and optional labels
- Names must match the regex
[a-zA-Z_:][a-zA-Z0-9_:]* - Each metric type must implement
typeandcollectmethods
Metric implementations should be thread-safe and handle concurrent access appropriately.
Constructors
Instance methods
collect
Sourcehelp
Sourcelabels
Sourcename
Sourcetype
Source