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 : 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 : Prometheus::LabelSet = LabelSet.new) new

Constructor Detail

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

Instance Method Detail

def collect : Array(Sample) #

def observe(value : Number) #

def type : String #