class

LavinMQ::HTTP::PrometheusWriter

Inherits Reference < Object

Formats into a buffer, whose writes are direct calls, and hands the output full buffers: the output is typed IO, so every write through it is a type switch, paid once per buffer instead of once per token.

Constants

BUFFER_SIZE = 32 * 1024

Class methods

open(output : IO, prefix : String, & : PrometheusWriter -> ) : Nil
Source

Instance methods

flush
Source
prefix
Source
prefix=(prefix : String)
Source
write(m : Metric)
Source
write_header(name : String, type : String, help : String)

Write only the TYPE and HELP header for a metric (no value)

Source
write_value(name : String, value : MetricValue, labels : MetricLabels)

Write only the metric value with labels (no TYPE/HELP)

Source

Nested types