abstract class Prometheus::Metric

Overview

Base class for all metric types (Counter, Gauge, Histogram, Summary).

This abstract class defines the common interface and behavior for all metrics:

Metric implementations should be thread-safe and handle concurrent access appropriately.

Direct Known Subclasses

Defined in:

types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, help : String, labels : Hash(String, String) = nil) #

def self.new(name : String, help : String, labels : Prometheus::LabelSet = LabelSet.new) #

Instance Method Detail

def collect(io : IO) : Nil #

def collect : Array(Sample) #

def help : String #

def labels : LabelSet #

def name : String #

abstract def type : String #