class Prometheus::Summary

Overview

A Summary captures individual observations from an event or sample stream and summarizes them with count and sum.

Use a Summary for metrics where you need the count and sum, such as:

Example:

summary = Summary.new("request_size", "Request size in bytes")
summary.observe(1024)

Summaries track:

Defined in:

metrics.cr

Constructors

Instance Method Summary

Instance methods inherited from class Prometheus::Metric

collect(io : IO) : Nil
collect : Array(Sample)
collect
, help : String help, labels : LabelSet labels, name : String name, type : String type

Constructor methods inherited from class Prometheus::Metric

new(name : String, help : String, labels : Hash(String, String) = nil)
new(name : String, help : String, labels : Prometheus::LabelSet = LabelSet.new)
new

Constructor Detail

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

Instance Method Detail

def collect : Array(Sample) #

def observe(value : Number, labels : Labels | Nil = nil) #

def type : String #